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?
|