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: IN expression for multiple columns in HQL
PostPosted: Wed Jan 14, 2009 2:22 am 
Newbie

Joined: Tue Nov 18, 2008 4:12 am
Posts: 8
Location: Singapore
On Oracle, I am able to execute the following query:

Code:
select * from test where (col1,col2) in ((1,2),(2,3),(3,4),(4,5))


I have a Java collection which is the result of a HQL query (select col1,col2 from another_table). Is there any way for me to include this collection in a HQL query to perform the above?

I'm thinking of a query along the lines of:

Code:
from testEntity where (col1,col2) in (:coll)

_________________
Life at i-flex turns me on!


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.