[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2826?page=c...
]
Steve Ebersole commented on HHH-2826:
-------------------------------------
Note to self:
1) IS NULL should get expanded with AND
Consider:
from Person p where p.name is null
The implication here is we want persons where all parts of their name are null:
select ... from person p where (p.f_name is null and p.l_name is null)
2) IS NOT NULL should get expanded with OR
Consider:
from Person p where p.name is not null
Here, the implication is that not (all parts of their name are null); if any part of the
name is not null then this check should logically succeed
select ... from person p where (p.f_name is not null or p.l_name is not null)
the above being functionally equivalent to:
select ... from person p where not ( p.f_name is null and p.l_name is null )
IS [NOT] NULL checks with component values
------------------------------------------
Key: HHH-2826
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2826
Project: Hibernate3
Issue Type: Improvement
Components: query-hql
Reporter: Steve Ebersole
Assignee: Steve Ebersole
Fix For: 3.2.6, 3.3
Currently the HQL translator attempts to render IS NULL and IS NOT NULL checks against a
component using tuple syntax. Would be much better to instead "explode" these.
For example, consider Person with a name property which is a component type of Name and
the HQL:
"from Person p where p.name is null"
Currently, we'd end up with SQL like:
"... from person p where (p.f_name, p.l_name) is null"
but the exploded form would make much more sense here:
"... from person p where ( p.f_name is null and p.l_name is 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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira