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: Eagerly fetching multiple to-many associations
PostPosted: Fri Oct 22, 2004 1:26 pm 
Newbie

Joined: Fri Oct 22, 2004 11:18 am
Posts: 9
Location: Lexington, KY
The Hibernate In Action book mentions a limit of one eagerly fetched collection for a single query. I have a few questions regarding this limitation:

1) Is that on a "per entity" basis? For example, Entity A has a to-many relation to B which has a to-many relation to C. Is it possible to fetch the entire A->B->C subgraph in a single query? Even though you have a large flattened result set, it still seems significantly faster in many cases to execute a single query as opposed to executing a separate query to retrieve C for each element B. Obviously, this assumes that the application knows for sure it will need to traverse the entire sub-graph.

If the restriction is per entity, I would think it means that if A has a to-many association to B and A also has a to-many association to C, that A can only eagerly fetch one of those two associations (not both) in a single query.

2) The book also metions these contraints might be lifted in future versions. We are planning to use Hibernate 3.0 with production deployment late next year. Is this still a constraint in 3.0?


-Aaron


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.