-->
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.  [ 4 posts ] 
Author Message
 Post subject: Hibernate Outer Joins Problem !
PostPosted: Fri Apr 15, 2005 11:26 am 
Newbie

Joined: Fri Apr 15, 2005 11:20 am
Posts: 3
Hi there

Just a complete beginner question. I'm trying to replace some Oracle specific joins in my SQL to make them work with hibernate / postgres and am having some real problems when it comes to joins.

What I'm trying to do is create a query which has multiple outer joins, the code looks like this from my oracle version

select * from a,b
where a.code = b.code (+)
and a.location = b.location (+)
and a.key = b.key (+)

What I've tried is something like this
select *
from a.code right outer join b.code
and a.location right outer join b.location
and a.key right outer join b.key

CAn anyone spot if I'm doing something totally wrong? Please help!


Top
 Profile  
 
 Post subject: Oops forgot to mention...
PostPosted: Fri Apr 15, 2005 12:05 pm 
Newbie

Joined: Fri Apr 15, 2005 11:20 am
Posts: 3
that SQL is being created in my Java code


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 15, 2005 1:22 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
Quote:
... from a.code ...


Well you are using an alias "a" which is not defined anywhere.

http://www.hibernate.org/hib_docs/reference/en/html/queryhql.html


Top
 Profile  
 
 Post subject: Oops
PostPosted: Mon Apr 18, 2005 5:16 am 
Newbie

Joined: Fri Apr 15, 2005 11:20 am
Posts: 3
Sorry about that, just added that code in at the last minute so it would read better. We do have a defined alright as select * from table1 a, like that.


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