-->
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: Hibernate's Duplication from outer join seems wrong
PostPosted: Fri Jul 25, 2008 1:25 pm 
Regular
Regular

Joined: Thu Nov 30, 2006 10:48 am
Posts: 59
http://www.hibernate.org/117.html#A12 emphasizes that 'some people actually want this' with the 'this' referring to the duplicate references Hibernate generates when marshalling the SQL outer join results to the objects.

Of course, many have hit this problem (e.g. http://forum.hibernate.org/viewtopic.ph ... duplicates). I think this violates the very philosophy of an ORM layer -- the SQL outer join correctly returns duplicate records but, when the results are logically marshalled into objects, these SQL outer join artifacts should not be retained. Even an HQL outer join has object-level semantics that shouldn't be tied to the SQL outer join implementation. If one were creating an ORM layer manually using ADO.Net, one would never duplicate the references -- we would perform the outer join using SQL and then process the results without any trace of the SQL artifacts (such as the SQL outer join duplication).

The decision to duplicate references is not well understood by me -- does anyone have a good ORM reason for why this should be left as it is?

We're experiencing the same problems as the above forum post (we don't have the root that has duplicate references but, instead, a nested class that has them).

Comments?

Thanks --

_________________
metazone


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.