ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron Craven" <hibern...@vickerscraven.net>
Subject Re: Avoiding N+1 selects with more complex graphs
Date Wed, 22 Jun 2005 19:45:43 GMT

Not a terribly big hurry, exactly. We are attempting to make some architectural decisions
about an application we're writing, and at the moment are trying to make a choice between
hibernate and iBATIS. I'm simply trying to fully understand what each framework offers. (No
small task!)

We are meeting tomorrow for further discussion and the intent of making a decision. This question
is simply something I have not been able to figure out with iBATIS.  But I'm not even entirely
certain it would be a requirement in our project.

I will certainly be looking forward to your response, regardless  of what path we choose.

---------- Original Message ----------------------------------
From: Larry Meadors <larry.meadors@gmail.com>
Reply-To: lmeadors@apache.org
Date:  Wed, 22 Jun 2005 11:37:51 -0600

>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
>> 
>> 
>> 
>> 
>> 
>>
>
 




________________________________________________________________
Sent via the WebMail system at vickerscraven.net


 
                   


Mime
View raw message