-->
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: Problem with fetch join
PostPosted: Tue May 27, 2008 5:14 am 
Newbie

Joined: Tue May 27, 2008 5:01 am
Posts: 1
I have a weird problem using fetching in HQL. consider this statement:

Code:
from TableA left outer join fetch TableA.TableBList


Where there is an 1:n relationship between TableA and TableB.
TableA contains exaclty one row, while TableB contains three rows, each related to the single entry in TableA.

As a result, i would expect getting back exactly one TableA object with the property TableBList preloaded.
But acutually this is not the case, i get back three entries in the result List, each object representing the same TableA row.

Adding a
Code:
select distinct TableA
doesn't help.

Is this a bug or a feature? I am using Hiobernate 3.0

Greetings,

Georg


[/code]


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.