Here is my implementation of this. There are a number of restrictions that
limit the usefulness of this, but some could be removed with some rework.
It's not full featured enough to add to core as is. Use at your own risk,
no guarantees, etc.
public static List batchFetch(Collection
sourceObjec
Hello Lon;
Unfortunately my current work does not use Cayenne so I am thinking back
a wee bit, but I think you might be able to do what you want by using
EJBQL. Look for "Similar Behaviours Using EJBQL" here;
http://cayenne.apache.org/docs/4.0/cayenne-guide/performance-tuning.html#prefetching
R
Hmmm…but I guess there wouldn’t be another way to do it unless you knew the
original query.
On Tue, Oct 4, 2016 at 8:59 AM, Lon Varscsak wrote:
> So, I finally got back around to this (still no solution). What you’re
> describing isn’t really what I’m after. What I’d like to do is take an
> ob
So, I finally got back around to this (still no solution). What you’re
describing isn’t really what I’m after. What I’d like to do is take an
object (or array of objects) and a list of keys and have Cayenne basically
do the same fetching it does with it’s pre-fetching code.
So when I use addPref
IIRC in EOF this was "probabilistic", with framework trying to guess which
other objects' relationships to include in batch fetch. So we'd also need to
track some kind of "affinity" of root objects between each other.
The first step would be to patch Cayenne to make
org.apache.cayenne.reflect.
That'd be something I'd get some use out of as well.
On Tue, Jul 5, 2016 at 5:19 PM, Lon Varscsak wrote:
> I know I’ve asked this before, but I need a batch fetch utility class, to
> trigger batch fetching of relationships. I know pre-fetching will do this,
> but usually when I need it is after