-->
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: like and in
PostPosted: Sun Mar 26, 2006 11:15 am 
Newbie

Joined: Wed Mar 22, 2006 3:22 pm
Posts: 9
Hibernate version:
3,1
Mapping documents:
NA
Code between sessionFactory.openSession() and session.close():
NA
Full stack trace of any exception that occurs:
NA
Name and version of the database you are using:
NA
The generated SQL (show_sql=true):
NA
Debug level Hibernate log excerpt:


I have a hql query that uses "in" example is
Code:
where name in (:name)


where :name might John, Mary, Steven

but I would like to also pass in partial names

such as Joh%, Ma%, St%

is this possible? I have tried in,like in and in like but thos are not valid.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 26, 2006 11:18 am 
Regular
Regular

Joined: Wed Aug 25, 2004 6:23 am
Posts: 91
No, sorry - I think that you'll have to do something like:


Code:
where name like ? or name like ? or name like ?


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.