[hibernate-issues] [Hibernate-JIRA] Created: (HHH-3101) HQL "is not true" gets incorrectly changed into SQL "<>true"
Gertjan van Oosten (JIRA)
noreply at atlassian.com
Mon Feb 11 06:56:33 EST 2008
HQL "is not true" gets incorrectly changed into SQL "<>true"
------------------------------------------------------------
Key: HHH-3101
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3101
Project: Hibernate3
Issue Type: Bug
Components: query-hql
Affects Versions: 3.2.6, 3.2.5
Environment: PostgreSQL
Reporter: Gertjan van Oosten
Priority: Minor
An HQL query with a where-clause on a boolean field like this:
where boolValue is not true
[boolValue is of type boolean, possibly NULL]
which, according to the SQL:2003 standard and PostgreSQL's implementation thereof, means: select all rows that have a boolValue of either UNKNOWN (or NULL) or FALSE.
However, this HQL statement gets translated into SQL like this:
where sometable0_.bool_value<>true
which is semantically different: select all rows that have a bool_value of FALSE, thus missing all rows where bool_value is UNKNOWN (or NULL).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list