-->
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: Override IgnoreCase function
PostPosted: Wed Feb 03, 2010 11:09 am 
Newbie

Joined: Wed Feb 03, 2010 10:46 am
Posts: 1
Hi there,

We use hibernate to support 2 database types - one is case sensitive (oracle) and one is not (sql server). Changing oracle to support case insensitive searches (vice versa with mssql) is not an option.

Ok - so we use the ignoreCase function in our SQL queries - works fine on everything except we get lower() in sql server, which stops from using indexes and makes customers complain ("why do you have lower() when the db is case insensitive!!").

So - I was thinking to override the ignoreCase in the SQL Server dialect to actually do nothing. Something like this -

public class MySQLServerDialect extends SQLServerDialect {
@Override
public String getLowercaseFunction() {
return "";
}
}

So whats my question - is this really the best solution?


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.