-->
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.  [ 5 posts ] 
Author Message
 Post subject: Join fetch collection returns duplicates
PostPosted: Fri May 27, 2005 4:37 am 
Senior
Senior

Joined: Sat May 14, 2005 8:40 am
Posts: 130
With a hql query that fetches a collection of child objects, duplicate parent objects are returned. This appears to be by design (from the Hibernate FAQ), but every user has to remove the duplicates by hand.

Is it possible to change this behaviour, so that no duplicates are returned?

_________________
Cuyahoga


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 02, 2005 5:56 pm 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
Created NH-300 for the request.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 02, 2005 6:32 pm 
Senior
Senior

Joined: Sat May 14, 2005 8:40 am
Posts: 130
Ah great, thanks!

_________________
Cuyahoga


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 02, 2005 6:34 pm 
Senior
Senior

Joined: Sat May 14, 2005 8:40 am
Posts: 130
Btw, it's not too difficult removing the duplicates from the list and you can easily build a generic routine to do this, but it just 'feels' so stupid :).

_________________
Cuyahoga


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 04, 2005 1:49 pm 
Newbie

Joined: Fri May 13, 2005 7:46 pm
Posts: 17
I believe this and issue 273 are one in the same. I had previously assumed it was only the ICriteria interface that suffered from this, but after discovering the source of the problem (which I commented on in 273), it makes more sense that any method to query would suffer.

So I already have a working fix in my own build (which I documented in the comments), but since the change in behaviour is so big, (and it seems a fix should be possible before the result return, so my solution seemed less than optimal), I wasn't sure it should be "THE" fix?

Anyways, thanks guys for an awesome tool, and all the time and effort you put into it! The code is in really nice shape too... it took me much less time to figure this issue out than I would have guessed not knowing anything at all about the internal design of NHibernate, and I definitely think that's directly attributeable to the obvious commitment to quality you guys have. Well, that and Resharper! :D


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