I don't see why this case shouldn't work... I still need to test a
number of scenarios, so I won't be surprised if there are a few bugs.
I'll try this one out.
Thanks
Andrus
On Mar 11, 2005, at 6:44 PM, Tore Halset wrote:
> On Mar 7, 2005, at 6:44, Andrus Adamchik wrote:
>
>> Just finished a new feature - joint prefetches in SelectQueries.
>> Still need to document that, but at the user level it comes down to
>> "SelectQuery.addJointPrefetch()". What's good about joint prefetches:
>
> I have one question regarding joint prefetches:
>
> A has a toMany to B and B has a flattened toMany to C
> A<-->>B<<-->>C
>
> SelectQuery q = new SelectQuery(A.class);
> q.addJointPrefetch("bArray");
> q.addJointPrefetch("bArray.cArray");
>
> Cayenne issue a join query between the tree tables A, B and C.
>
> Looping all Bs for a given A works, but looping all Cs for a given B
> result in lots of queries.
>
> Am I doing something wrong? Perhaps I should mix standard prefetch and
> joint prefetch?
> A single joint prefetch from B to C works if my query-root is B.
>
> Regards,
> - Tore.
This archive was generated by hypermail 2.0.0 : Fri Mar 11 2005 - 20:02:55 EST