-->
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: Parameter Groups in In-Clause
PostPosted: Thu Sep 06, 2012 4:09 am 
Newbie

Joined: Thu Sep 06, 2012 3:40 am
Posts: 1
Hello,

I'm trying to implement the following in-clause with hibernate:

Code:
SELECT b from BildInfo b WHERE (b.bnr, b.bid) IN ((10,1), (10,2))


I can't figure out how to set the bind variables.
I've tried the implement a composite object "InfoId" with two members (bnr,bid)
and set the parameter list as List<InfoId>. But that doesn't work.

Code:
Query query = session.createQuery("SELECT b from BildInfo b WHERE (b.bnr,b.bid) in :infoids"
query.setParameterList ("infoids", listOfInfoId);


Maybe it is not possible to implement this type of in-clause in hibernate?
I'm using Hibernate 3.6.7

Thanks for any help,
Chris


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.