Issue Type: Bug Bug
Assignee: Unassigned
Components: query-hql
Created: 28/Sep/12 1:10 PM
Description:

There were 2 problems discovered with the "with"-clause interpretation:

1) "<>"-operator transfers to "<>" in Oracle in the generated SQL.
For example,
select distinct c
from Customer c
left join c.orders o
with o.value <> 50

will be interpreted in Oracle as
... where o.value<> 50

Which isn't a valid clause in Oracle.

Changing example to
with (o.value < 50 or o.value > 50)
solves the problem.

2) In Oracle, the conditions of the "with"-clause are made part of the "where"-clause in the generated SQL, and not of the "on"-clause - as it is to be done according to the on-line documentation.

I'm quoting, Chapter 11: "in the generated SQL the conditions of the with clause are made part of the on clause in the generated SQL as opposed to the other queries in this section where the HQL/JPQL conditions are made part of the where clause in the generated SQL."
http://docs.jboss.org/hibernate/orm/4.1/devguide/en-US/html/ch11.html#d5e2702

Environment: Windows 7
Project: Hibernate ORM
Labels: HQL dialect
Priority: Minor Minor
Reporter: Svitlana Kamenska
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira