]
Strong Liu reassigned HHH-6777:
-------------------------------
Assignee: Strong Liu
HQL "in" transformed to incorrect SQL with Oracle dialect
---------------------------------------------------------
Key: HHH-6777
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-6777
Project: Hibernate Core
Issue Type: Bug
Components: query-hql
Affects Versions: 4.0.0.Beta5
Environment: JBoss AS 7.0.1.Final, Hibernate Core 4.0.0.Beta5, Oracle 10g
Reporter: Michael Zeising
Assignee: Strong Liu
Priority: Critical
Labels: HQL, dialect
The HQL query
{{select c.left_id, c.right_id from Allocation_Conflict c where c.planning_id =
:planningId and ((c.left_id in :allocationIds) or (c.right_id in :allocationIds))}}
is translated to
{{... (c.left_id in ?, ?) or (c.right_id in ?, ?)}}
which leads to the Oracle error "ORA-00907: missing right parenthesis". The
workaround is to write
{{... ((c.left_id in (:allocationIds)) or (c.right_id in (:allocationIds)))}}
which is not intented because Hibernate adds the parenthesis automatically in other
queries.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: