Actually JPA allows to specify that certain relationships are always
"eagerly fetched" (although it doesn't have a concept of prefetching
in the queries)... 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.
>
This archive was generated by hypermail 2.0.0 : Mon Oct 22 2007 - 07:40:17 EDT