-->
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.  [ 3 posts ] 
Author Message
 Post subject: Case insensitive queries
PostPosted: Thu Jun 15, 2006 3:34 pm 
Newbie

Joined: Tue Nov 15, 2005 8:27 pm
Posts: 19
Location: Columbia, MO USA
How can I make a simple parameterized HQL query like:

from User where username = :username

case insensitive so it would match Users regardless of whether their usernames are upper-case, lower-case, or mixed-case?

Bruce


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 15, 2006 3:43 pm 
Expert
Expert

Joined: Fri Aug 19, 2005 2:11 pm
Posts: 628
Location: Cincinnati
case sensitivity commands for hql can be found right here
http://www.hibernate.org/293.html

_________________
Chris

If you were at work doing this voluntarily, imagine what you'd want to see to answer a question.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 15, 2006 3:49 pm 
Expert
Expert

Joined: Fri Aug 19, 2005 2:11 pm
Posts: 628
Location: Cincinnati
wait. That is a source code modification you'd have to compile into the hibernate jar. Not to mention it looks like a bad hack.

Hmm, I'd suggest either changing cases in the code, or using a sql query which will use the database's upper or lower commands.

_________________
Chris

If you were at work doing this voluntarily, imagine what you'd want to see to answer a question.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.