]
Rafal Figas commented on HHH-2772:
----------------------------------
Hereby I confirm this bug exists in 3.6.7.
with-clause stopped working
---------------------------
Key: HHH-2772
URL:
https://hibernate.onjira.com/browse/HHH-2772
Project: Hibernate ORM
Issue Type: Bug
Components: query-hql
Affects Versions: 3.2.2, 3.2.3, 3.2.4, 3.2.4.sp1, 3.2.5
Reporter: Ivo Danihelka
The with-clause stopped working in all hibernate versions above 3.2.1 (i.e. 3.2.2+).
Before that, it was possible to write HQL:
SELECT cat FROM Cat cat LEFT JOIN cat.kittens as kitten WITH kitten.owner=:owner
Now the HQL is raising an exception:
org.hibernate.hql.ast.InvalidWithClauseException: with clause can only reference columns
in the driving table
Workaround is to explicitly use primary key (ownerId):
SELECT cat FROM Cat cat LEFT JOIN cat.kittens as kitten WITH
kitten.owner.ownerId=:ownerId
--
This message is automatically generated by JIRA.
For more information on JIRA, see: