-->
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: "Escape" clause and quotations in HQL?
PostPosted: Wed Apr 12, 2006 8:25 am 
Beginner
Beginner

Joined: Wed Apr 27, 2005 8:27 am
Posts: 27
Hi everyone,

What is the equivalent clause to 'escape' from SQL in HQL?
ex.: select * from client as cli where cli.name like ('%/%%') escape ('/')

How can I make my query in HQL to find for a field with a ' ?
example with SQL: select * from client cli where cli.name like ('%''%')
in SQL, I must write 2 single quotations (''). Do I have to do the same way in HQL?

Can anybody give me a hint?

thanks, Guilherme


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 12, 2006 10:03 am 
Regular
Regular

Joined: Wed Aug 25, 2004 6:23 am
Posts: 91
I don't think that there is a way to escape it but you could pass it in as a parameter


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.