-->
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: Case insensitivity in queries
PostPosted: Tue Sep 07, 2004 12:27 pm 
Beginner
Beginner

Joined: Thu May 27, 2004 3:07 pm
Posts: 20
Hibernate version:
2.1.4


I'm looking for some help on the following issue.

SQLServer performs all string comparisons in a case insensitive fashion.
So, to preserve this behavior on oracle, we have to make our queries such that they all code in case insensitivity.

Using the hibernate API is to do this is not entirely possible from what i've seen.

It is very easy for the SimpleExpression operations (=,<,>,<=,>=) by using the "ignoreCase" method on SimpleExpression, and the like expression (using ilike).

However, we also need to make sure that between, in, and the property operators (propEq, etc...) can case insensitive. However, there is no convenient "ignoreCase" method on these API's.

I've tried using "upper(property)" as the property name, but that causes
an exception, since hibernate expects an exact property name.

I've also tried building the hql, and using Expression.sql, but that doesn't work since it expects column names in that case, and I get a column not found error.

Anyone have any ideas?


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.