ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Larry Meadors <larry.mead...@gmail.com>
Subject Re: Avoiding N+1 selects with more complex graphs
Date Wed, 22 Jun 2005 17:37:51 GMT
I know you could do this with a rowhandler, but have not tried it
using the groupBy attribute.

If you are not in a great big hurry, I will be looking at this in a
couple of days (possibly this weekend).

Larry


On 6/22/05, Aaron Craven <hibernate@vickerscraven.net> wrote:
> 
> I cannot decide if I've missed something in the documentation, or if I'm just plain old
confused, but either way I need some help.  With iBATIS 2, I realize the N+1 selects problem
has been solved by the addition of the groupBy property.  However, I'm a bit confused as to
how this would be done with a deeper object graph.  For example, suppose I have:
> 
> - A Mapping that retrieves a number (M) of customers.  Each customer has, in turn
> - A number (N) of contacts.  Each contact, then has
> - A number (P) of addresses.
> 
> Which would represent a… M:N:P relationship :)
> 
> If I want this all in one mapping (something like CUSTOMER INNER JOIN CONTACTS ON (…)
INNER JOIN ADDRESSES ON (…)), would it be possible, or is the depth of the join limited
to one level of nesting?
> 
> Thanks!
> 
> 
> 
> 
> ________________________________________________________________
> Sent via the WebMail system at vickerscraven.net
> 
> 
> 
> 
> 
>
Mime
View raw message