Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0030477Openbravo ERPA. Platformpublic2015-07-31 14:572022-02-01 08:09
AugustoMauch 
Triage Platform Base 
normalminorhave not tried
newopen 
5
 
 
Core
No
0030477: Generate a query with UPPER when using the ilike operator in Hibernate
When the ilike operator is used in Hibernate, it is translated to SQL like this:

Postgres: this_.columName ilike ?

Oracle: lower(this_.columName) like ?

There are two problems with this:
- It is not possible to use indexes when the ilike operator is used in postgres [1]
- We are consolidating the use of lower instead of upper (see [2])

[1] http://postgresql.nabble.com/How-to-force-Postgres-to-use-index-on-ILIKE-td2057162.html#a2057163 [^]
[2] https://issues.openbravo.com/view.php?id=30476 [^]
See the definition of IlikeExpression.toSqlString [1]

[1] http://www.grepcode.com/file/repo1.maven.org/maven2/hibernate/hibernate/3.1beta3/org/hibernate/criterion/IlikeExpression.java?av=h#29 [^]
No tags attached.
related to feature request 0030476 new AugustoMauch Consolidate the user of UPPER/LOWER to achieve case insensitive filtering 
Issue History
2015-07-31 14:57AugustoMauchNew Issue
2015-07-31 14:57AugustoMauchAssigned To => platform
2015-07-31 14:57AugustoMauchModules => Core
2015-07-31 14:57AugustoMauchTriggers an Emergency Pack => No
2015-07-31 14:57AugustoMauchRelationship addedrelated to 0030476
2022-02-01 08:09alostaleAssigned Toplatform => Triage Platform Base

There are no notes attached to this issue.