[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2647?page=c...
]
Dennis Fleurbaaij commented on HHH-2647:
----------------------------------------
@Nicolas
In despite of the fact that this is some obscure undocumented* behaviour and that a
natural feeling of parenthesis, as used in math/normal SQL/programming languages is
concidered a feature requested, I still think it's a bug. Bugs aren't only against
erronous code, but also against things like these.
Performance improvements are something to watch out for, I do agree with you on that, but
the loss in developer time and increase in complexity/non standards conformity (see how
long this topic is opened) far outwheighs any small optimizations in the query IMHO.
* = I couldn't make this behaviour up from the documentation.
Problems with OR parenthesis in HQL
-----------------------------------
Key: HHH-2647
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2647
Project: Hibernate3
Issue Type: Bug
Components: query-hql
Affects Versions: 3.2.1
Environment: Hibernate 3.2.1, postgresql 8.2, jboss 5 embedded beta 2
Reporter: Dennis Fleurbaaij
Original Estimate: 15 minutes
Remaining Estimate: 15 minutes
Given the following (part) of a query in HQL (where 1 to 6 are comparisons of different
types (=, <=, is null), but irrelevant for the problem posted here ):
AND ( ( 1 AND 2 ) OR ( 3 AND 4 ) OR ( 5 AND 6 ) )
will be balanced to:
and ( ( 1 ) and 2 or 3 and ( 4 ) or 5 and 6 )
--
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