-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Perforamance One To Many with Eager Objects causes (N+1)
PostPosted: Thu Oct 04, 2007 9:30 am 
Beginner
Beginner

Joined: Tue Nov 29, 2005 4:42 pm
Posts: 49
Location: Atlanta, GA
I have some objects with similar relationships to the following:

Parent has many Children
Children has one Favorite Toy

Say I'm loading the parent, and I'd like to eagerly load the children with ajoin with that parent. By default Toy will be eagerly loaded with the children. However, Hibernate is loading the Favorite Toy of each child as N+1. The Toy class isn't in the join clause of the original select statement! Why is it not doing that? How to I tell hibernate to do that?

Charlie


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.