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: Hibernate HQL and special characters
PostPosted: Thu Nov 19, 2009 12:25 pm 
Newbie

Joined: Tue Feb 24, 2009 8:39 pm
Posts: 19
Good evening lords and ladies.

I'm working with an SQLServer legacy database, it's fields are plenty of bad encoded characters and not so bad encoded characters.
Like this:
ZU#IGA
ZU¦'IGA
ZU¿IGA
ZU=IGA
ZU¥IGA
ZUÃ?IGA
ZUÂ¥IGA
ZUðIGA
ZUÑIGA

All surenames refer to Zuñiga surname, if I write a query changing the problematic characters by "_" underscore, the HQL query finds all possible fields related.

i.e.: Select surname from names where surname like 'Zu_niga%'

Question is: Exists an Hibernate mechanism to filter and replace the problematic charactes before a parameter substitution takes place or before query execution?

Thank you!


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.