-->
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.  [ 3 posts ] 
Author Message
 Post subject: Eager fetching from a loaded object
PostPosted: Wed Dec 07, 2005 5:33 pm 
Regular
Regular

Joined: Tue May 31, 2005 9:55 am
Posts: 67
I have an object model which contains several levels of lazy 1-M relationships. Assuming I already have the parent object loaded and the first level of a 1-M relationship (using eager fetching) in the session, is it possible to eagerly fetch all simple associations and the next level of 1-M association from the first level.

Level 0 Level 1 Level 2
[1] Order -> [1-M] Requirements -> [1-M] Events

My goal is to reduce the total number of queries to load the entire object model. This must be done incrementally since only 1 collection may be fetch eagerly at a time

Thanks,
craig


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 08, 2005 12:19 pm 
Contributor
Contributor

Joined: Thu May 12, 2005 9:45 am
Posts: 593
Location: nhibernate.org
AFAIK, you can fetch only one collection.

_________________
Pierre Henri Kuaté.
Get NHibernate in Action Now!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 08, 2005 1:23 pm 
Regular
Regular

Joined: Tue May 31, 2005 9:55 am
Posts: 67
If I can only fetch 1 collection at a time, what is the best way to incrementally load a hierarchy of 1-M associations with the fewest queries?

craig


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

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.