-->
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: Outer join problem
PostPosted: Tue Aug 02, 2005 11:40 am 
Newbie

Joined: Wed Jul 13, 2005 2:25 pm
Posts: 1
Hibernate version 3.0

I have two tables A and B. Table A is the parent and table B the child. My hibernate mapping file uses a many-to-one with outer-join="true". When I get a list from the A class, I get all of the data in A even if there is no row in B. This works great until I impose an order by clause. This causes the left outer join to turn into an inner join. Now I get only the rows in A that have a row in B. Not good. Hibernate should not change the join when an order by is used. If I was matching a column on the B table, then an inner join would be appropriate.

Is there a way around this?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 02, 2005 11:47 am 
Regular
Regular

Joined: Thu May 26, 2005 2:08 pm
Posts: 99
Are you trying this with a Criteria?

If so, the short answer is no. See here: http://forum.hibernate.org/viewtopic.ph ... highlight=

Somewhere on this forum, I recall reading that this might change in 3.1, but I can't find the reference to that right now.


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.