-->
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.  [ 3 posts ] 
Author Message
 Post subject: Is left outer join supported?
PostPosted: Thu Apr 29, 2004 1:14 pm 
Newbie

Joined: Thu Apr 29, 2004 1:09 pm
Posts: 4
According to the html documentation hibernate supports outer joins. I'm not sure though if it's possible to make a right join in the following situation:

Code:
A <- B (many-to-one in B)


I'd like to have a right outer join like the following:

Code:
select a, sum(b.property) from a left outer join b on b.aId = a.id group by a


Or is it essential to have a collection mapping for A -> B (on-to-many)?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 29, 2004 2:29 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
explicit joins on arbitary conditions (eg an ON clause) are not supported


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 29, 2004 2:39 pm 
Newbie

Joined: Thu Apr 29, 2004 1:09 pm
Posts: 4
Ah I see. I got it working now using a right outer join:

Code:
select a, sum(b.property) from b right outer join b.a group by a
[/code]


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