Assume that I have the three related tables, as I included in an
earlier post.

If I were to do

 List members = MemberPeer.doSelectAll(new Criteria());
 
 Iterator i = members.iterator();
 
 while (i.hasNext())
 {
     Member member = (Member) i.next();
     System.out.println(member.getFirstName() + " " +
     member.getLastName() + " " + member.getCompany().getName());
 }

I discover in the logs that a new query on the company table is
executed for each and every member.  If I had 30 members to display,
that would be a total of 31 queries.  Ahhh, that can't be good!  How
do you make torque select the data before that fact?

Dan

-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Daniel Allen, <[EMAIL PROTECTED]>
http://www.mojavelinux.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
"The package said 'Windows 95 or better', so I installed Linux"
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to