ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brad Handy" <brad.ha...@gmail.com>
Subject Avoiding N+1 Selects
Date Tue, 20 Feb 2007 01:10:56 GMT
I have a table which has all of the parent/child relationships in the same
table.  I would like to avoid the N+1 selects with this construct, but it's
unclear from the documentation if this can be done.

Let's say I have the following relationships defined in the table:

Grand Parent
   Parent 1
      Child 1
      Child 2
   Parent 2
   Parent 3
      Child 3
      Child 4

When creating the child objects for "Grand Parent", will the same "Parent*"
objects be used to add the children "Child*" objects to the appropriate


View raw message