cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruno René Santos <>
Subject Using query results on relatioships
Date Wed, 10 Nov 2010 00:38:40 GMT
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

Bruno Santos

View raw message