-->
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: Left Join Fetch Query Returning More Rows Than Expected
PostPosted: Thu Sep 03, 2009 4:41 pm 
Newbie

Joined: Fri Jul 17, 2009 10:06 am
Posts: 2
I have a query that should only be returning 1 row but instead is returning multiple rows. I suspect this is due to the fact that I'm using a left join fetch.

My query is as follows:

select d FROM Declaration d
left join fetch d.propertyAddress
left join fetch d.propertyAddress.additionalPins
...

Anyone know why this might be causing a problem?


Top
 Profile  
 
 Post subject: Re: Left Join Fetch Query Returning More Rows Than Expected
PostPosted: Thu Sep 03, 2009 9:24 pm 
Newbie

Joined: Wed Oct 01, 2008 2:27 pm
Posts: 18
Try:

select distinct d FROM Declaration d ...


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.