-->
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: Help with left outer join
PostPosted: Wed Aug 22, 2012 10:32 am 
Newbie

Joined: Wed Aug 22, 2012 10:25 am
Posts: 2
I am new to Hibernate. Following is a simple select statement that I am trying to replicate in HQL/JPA
select e1.*
from emp e1 left outer join emp e2
on e1.keyid = e2.pkeyid
where e1.empid = :empid

Can someone please let me know the correct syntax for this query in HQL. I have tried several options but it fails

like select e1
from emp e1 left join emp e2
on e1.keyid = e2.pkeyid
where e1.empid = :empid


or

select e1
from emp e1 left join emp e2
where e1.empid = :empid
and e1.keyid = e2.pkeyid

Do I have to add anything to the mapping file.
Thanks for your help.


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.