-->
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.  [ 2 posts ] 
Author Message
 Post subject: eager fetching
PostPosted: Fri May 27, 2005 10:42 am 
Newbie

Joined: Thu Dec 11, 2003 3:27 pm
Posts: 12
I would like to fetch a group of Bids in a way that populates their Item. The hoped-for result would allow me to invoke bid.getItem().getDescription() on a given item without Hibernate issuing an additional select statement.

What I'm asking for is basically the inverse of the eager fetching strategy discussed in section 7.3.2. Instead of Items with their Bid collections initialized, I want Bids with their Item initialized.

On the face of it, you'd think that a simple inner join would do the trick here. You'd even think that eagerly fetching the items' category would be possible and would perform well, since that would just require another inner join.

But in "Hibernate in Action" as well as in the hibernate reference, I've only seen eager fecting done with outer joins. Is it possible to do this kind of eager fetching with Hiberante?


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 27, 2005 10:46 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
"inner join fetch"

actually, HB3 aften optimizes to an inner join if the FK in non-null.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.