]
Diego Pires Plentz resolved HHH-2779.
-------------------------------------
Assignee: Diego Pires Plentz
Resolution: Rejected
Ok ;-)
Column value incorrectly enclosed in square brackets in SQL generated
by Hibernate when using Restrictions.ne with ignoreCase()
-------------------------------------------------------------------------------------------------------------------------------
Key: HHH-2779
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2779
Project: Hibernate3
Issue Type: Bug
Components: query-criteria
Affects Versions: 3.1.3
Environment: Both MySQL and Oracle, Java 5.0
Reporter: Vladimir Strugatsky
Assignee: Diego Pires Plentz
These are the generated FROM and WHERE clauses:
from IMPACTS this_ left outer join IMPACT_DEGREE_TYPES alias_1x1_ on
this_.ID_IMPACT_DEGREE_TYPES=alias_1x1_.ID_IMPACT_DEGREE_TYPES where
lower(alias_1x1_.IMPACT_DEGREE_TYPE)<>?
And here is the value of the IMPACT_DEGREE_TYPE as generated by Hibernate:
[2007-08-13 19:13:31,039]: [DEBUG] org.hibernate.type.StringType - binding '[0 - no
impact]' to parameter: 1
The value that we pass to Restrictions.ne() is '0 - No Impact' . Hibernate
correctly converts the value to the lower case, because we use ignoreCase(). But it also
encloses the value in square brackets, which, of course, breaks the query.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: