]
Steve Ebersole commented on HHH-6915:
-------------------------------------
Right, had it backwards. Too much going on...
Restrictions.ilike(String propertyValue, Object value) does not
correctly initialize LikeExpresison
---------------------------------------------------------------------------------------------------
Key: HHH-6915
URL:
https://hibernate.onjira.com/browse/HHH-6915
Project: Hibernate ORM
Issue Type: Bug
Components: core
Affects Versions: 4.0.0.Final
Reporter: Martin Kartumovich
Assignee: Steve Ebersole
Priority: Minor
Labels: criteria
Fix For: 4.1.2
Time Spent: 22m
The method Restrictions.ilike(String propertyValue, Object value) uses the
LikeExpression-Constructor LikeExpression(propertyName, value.toString()) which will
initialize the LikeExpression with "ignoreCase = false".
The resulting SQL shows a normal "xyz like ?" instead of the expected
"lower(xyz) like lower(?)" (i.e. Oracle10gDialect).
This issue seems to have been introduced with HHH-4943.
Workaround: Use Restrictions.ilike(String propertyValue, Object value, MatchMode mode).
This will correctly initialize LikeExpression with "ignoreCase = true".
--
This message is automatically generated by JIRA.
For more information on JIRA, see: