-->
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: Is there a way to escape % and _ wildcard chars using HQL?
PostPosted: Wed Jun 08, 2005 7:06 pm 
Newbie

Joined: Mon Mar 14, 2005 10:15 pm
Posts: 1
A question that has been asked on this forum, but doesn't seem to have an answer.

I basically want to use a named parameter with a value of 'Hello_World%' and actually have a SQL statement generated that escapes the wildcard characters.

Is this possible for Hibernate to do this in a database agnostic way?

If so, please point me to that jewel of information.

If not, just say no and the truth will set me free ... to write my own code to provide this functionality :)

I just do not want to re-invent the wheel, and I haven't seen the use of wildcards discussed in the documentation at all.

Any help is appreciated!

Thanks,
-Dave


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 09, 2005 1:30 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Of course. Same way as JDBC: setParameter()


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.