[hibernate-issues] [Hibernate-JIRA] Closed: (HHH-2647) Problems with OR parenthesis in HQL
Steve Ebersole (JIRA)
noreply at atlassian.com
Tue Nov 10 23:14:08 EST 2009
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2647?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Steve Ebersole closed HHH-2647.
-------------------------------
Assignee: Steve Ebersole
Resolution: Rejected
The first phase of the query parser actually groups and aligns the predicates according to your parenthesis; it changes the order in which they are evaluated (imagine, just like would happen in the sql's query translator!).
@Guillaume, @Denis Would it be ideal to be able to match the parenthesis from the input string into the output string. Well *perhaps* (I personally think it is not necessary since as y'all are finding out the results are consistent). However, this *will not* happen unless someone steps up and produces a patch for this. It is extremely difficult to do and you get zero benefit for all that effort.
> Problems with OR parenthesis in HQL
> -----------------------------------
>
> Key: HHH-2647
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2647
> Project: Hibernate Core
> 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
> Assignee: Steve Ebersole
> Attachments: testcase.zip
>
> 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.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list