-->
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: Can I specify join in createQuery()?
PostPosted: Mon Jun 16, 2008 1:23 pm 
Newbie

Joined: Mon Jun 16, 2008 1:15 pm
Posts: 15
It seems like that HQL does not recognize "inner join on" syntax. It accepts inner join, but if you specify "on" condition, it blows up.

I understand how to define OneToOne, OneToMany etc in JPA, but is that the only way? what if I want to specify join in my createQuery() call?


Last edited by peiguo on Sat Aug 02, 2008 5:50 pm, edited 2 times in total.

Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 15, 2008 7:27 pm 
Newbie

Joined: Mon Jun 16, 2008 1:15 pm
Posts: 15
Just thought to follow up on my own post... There is an Hibernate bug open for this. It has been there for a while, and doesn't look like anybody is going to fix it any time soon.


Top
 Profile  
 
 Post subject: Mean while
PostPosted: Tue Jul 15, 2008 9:16 pm 
Newbie

Joined: Wed Jul 02, 2008 10:39 pm
Posts: 6
Location: Hyderabad
Hi In the mean while u can use the query some thing like.

select * from emp where id in () or not in ()

it will be just like your outer join

_________________
Regards,
Racha Satish Kumar,
Visit Me Here!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 16, 2008 6:12 am 
Expert
Expert

Joined: Tue May 13, 2008 3:42 pm
Posts: 919
Location: Toronto & Ajax Ontario www.hibernatemadeeasy.com
Thanks for the updates!

Sometimes it might feel like you're talking to yourself, but there are lots of people hitting this thread with the same question.

_________________
Cameron McKenzie - Author of "Hibernate Made Easy" and "What is WebSphere?"
http://www.TheBookOnHibernate.com Check out my 'easy to follow' Hibernate & JPA Tutorials


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.