-->
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.  [ 2 posts ] 
Author Message
 Post subject: Does Hibernate support subqueries in the FROM clause?
PostPosted: Wed Apr 27, 2005 8:04 am 
Newbie

Joined: Fri Dec 03, 2004 11:57 am
Posts: 4
Hibernate version:
2.1.6

Hi,

I read in an old forum post that Hibernate supports subqueries in the WHERE clause but not the SELECT clause. What about the FROM clause?

Something akin to this:

select item from PItem item, (select item from PItem item, PSubTable1 sub1 where ...) subQuery1 where item.field = subQuery1.field

I realize there are simpler forms of this query but am still interested in seeing if this case is possible.

Thank you,
BU


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 27, 2005 8:05 am 
Newbie

Joined: Fri Dec 03, 2004 11:57 am
Posts: 4
Addendum:

I tried a simple query like the one above and got:

QueryException: in expected: select [select item.....]


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