-->
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: WHERE IN (?) ?
PostPosted: Tue Feb 10, 2004 9:45 am 
Newbie

Joined: Tue Feb 10, 2004 9:26 am
Posts: 12
Hi All.

I am running hibernate 1.2 with postgresql 7.2.4.
I would like to do a HQL query like the following passing a list or Array to the WHERE IN clause.

I would like to do something like this:
Code:
SELECT table
FROM table IN class com.sys.hib.Table
WHERE table.tableId IN (?)
new Object[] { idList },
new Type[] { Hibernate.? }
;


I'm sure this fairly straight forward I have just missed it.
Thanks in advance.
Ian...


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 10, 2004 9:48 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
On 2.1.2:

session.createQuery("blabla where id in :something").setParameterList("something", list);

Don't know if this exists allready on 1.something and I'm not going to dig it up :)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 10, 2004 12:14 pm 
Newbie

Joined: Tue Feb 10, 2004 9:26 am
Posts: 12
Thank you very much, it works great on 1.2.
I had to change my DAO a bit bit it needed doing anyway.
I do plan on upgrading to latest stable soon.
Thanks again.
Ian...


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.