http://cayenne.apache.org/doc/prefetching.html
On 10/11/10 11:38 AM, Bruno René Santos wrote:
> Hello all,
>
> I have a doubt about performance on cayenne (or probably ORM's in general...).
> Imagine a table B that has a foreign key to table A and also a foreign key to
> table C. You have a query that returns 1000 A's to a form where you have a table
> that shows all B's that belong to A. Also on each row you show a field of the
> table C.
>
> What happens, logically, is that for each row a query is made to fetch the C
> object related to B, 1000 times...
>
> What do you suggest I could do to only do a query to table C and make Cayenne
> get objects from that result to populate B's relationship with C? Is there some
> simple way to do this and still maintain the proper relationship between B and
> C?
>
> Thanx
> Bruno Santos
>
-- --------------------------> Aristedes Maniatis GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A
This archive was generated by hypermail 2.0.0 : Wed Nov 10 2010 - 01:51:10 UTC