-->
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: Difference between fetch="select" and fetch="
PostPosted: Mon Apr 28, 2008 9:16 am 
Beginner
Beginner

Joined: Sun Oct 14, 2007 7:29 pm
Posts: 23
Hello all,

I am new to Hibernate and still trying to figure this thing out, so please excuse me if this is a trivial question.

In a many-to-many relationship, what is the difference between setting the "fetch" attribute to "select" vs "join"? I can't tell a difference.

I am tweaking my HQL to get the desired results using "left join fetch" but I am getting duplicate records back and I want to find a way to the duplicates. I am wondering if I am misintrepreting this field as I have fetch="join".

I also don't understand what the bolded part of the Hibernate Reference text below is trying to indicate. Can someone interpret for this newbie?

Quote:
(4) fetch (optional - defaults to join): enables outer-join or sequential select fetching for this association. This is a special case; for full eager fetching (in a single SELECT) of an entity and its many-to-many relationships to other entities, you would enable join fetching not only of the collection itself, but also with this attribute on the <many-to-many> nested element.



Thanks,

-Matt


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.