-->
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: How to bind a collection/array param in hql WHERE IN clause?
PostPosted: Wed Nov 22, 2006 7:44 pm 
Newbie

Joined: Fri Nov 04, 2005 11:42 am
Posts: 13
Hi

I want to bind a collection or an array parameter in a hql statement for the "WHERE IN" clause. So for example, my hql looks something like:

Code:
select o from object o where o.id in :idList.


Can I do something like this? If not, is there any other way to do this besides adding all the ids to the hql string itself?

Thanks,
Neha.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 23, 2006 6:11 am 
Regular
Regular

Joined: Tue Feb 24, 2004 11:42 am
Posts: 56
yes you can .
from Show show where 'fizard' in indices(show.acts)

Excerpts from 14.9. Expressions in hobernate documentation

Hope this helps

Please dn't forget to rate


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.