-->
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 it possible to join two independent entities in HQL?
PostPosted: Wed Oct 22, 2003 10:14 pm 
Newbie

Joined: Wed Aug 27, 2003 5:31 am
Posts: 10
Hi, Hibernate gurus,
I have a query upon Part and Inventory. Every part may have its inventory info consists of
part, warehouse, stocklocation and quantity as minimum. Part has a property bLevel.
Now I want to find all parts whose inventory is below its bLevel. If a part has no inventory
entry in database, its inventory's quantity is zero. So we need out join.
But since Part has no association to Inventory. I don't how to write such HQL. And I wonder
whether it's possible to join two independent entities in HQL?

Are there any alternatives or work-arounds?

Thank you very much!

Justine


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 23, 2003 1:31 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
It is possible to write an _inner_ join in theta style (ie. a traditional where-clause join). It is not possible to do an outer join on an arbitrary condition, except using createSQLQuery().


Top
 Profile  
 
 Post subject: RE
PostPosted: Thu Oct 23, 2003 9:37 pm 
Newbie

Joined: Wed Aug 27, 2003 5:31 am
Posts: 10
Hi, gavin

I understand. Thank you very much!


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.