On Oct 22, 2007, at 4:39 AM, Andrus Adamchik wrote:
> Actually JPA allows to specify that certain relationships are
> always "eagerly fetched"
true
> (although it doesn't have a concept of prefetching in the queries)...
There is an explicit "fetch join" in JPA queries that you can use to
explicitly eagerly fetch related entities.
Craig
> I haven't thought yet how we may handle that in Cayenne, but that
> feature is essentially what you are asking for. (But of course
> it'll be quicker to hack the getter, like you suggested).
>
> Andrus
>
> On Oct 22, 2007, at 2:26 PM, Tore Halset wrote:
>> Hello.
>>
>> We have a to-many relationship that is used all over the
>> application. Each time someone goes over that to-many relationship
>> they want to take a look at the next to-many relationship as well.
>>
>> A <-->> B <-->> C
>>
>> To make this faster, I want to prefetch the relationship from B to
>> C each time someone goes from A to B.
>>
>> Is this possible by just overriding A.getBs() without loosing the
>> positive sides of faulting? I think I want the ToManyList to use
>> prefetches in its underlying SelectQuery.
>>
>> Regards,
>> - Tore.
>>
>
Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:Craig.Russel..un.com
P.S. A good JDO? O, Gasp!
This archive was generated by hypermail 2.0.0 : Mon Oct 22 2007 - 13:21:16 EDT