]
Adam Dyga commented on HHH-2609:
--------------------------------
Yes, this seems to be exaclty the same issue as I reported in
Delete with multiple nested sub-queries generates invalid SQL (on
Postgresql)
-----------------------------------------------------------------------------
Key: HHH-2609
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2609
Project: Hibernate Core
Issue Type: Bug
Components: query-hql
Affects Versions: 3.2.4
Environment: Linux, JDK 1.5.
Reporter: Michael Barker
Attachments: delete-ejbql-problem.zip
When a delete uses multiple nest subqueries the resulting SQL query generated is invalid.
E.g. the EJB-QL:
DELETE Foo f WHERE f.fooId NOT IN (SELECT bar.fooId FROM Bar bar) AND f.fooId NOT IN
(SELECT baz.fooId FROM Baz baz)
or
DELETE Foo WHERE fooId NOT IN (SELECT fooId FROM Bar) AND fooId NOT IN (SELECT fooId FROM
Baz)
Generates the following:
delete from Foo where (fooId not in (select bar1_.fooId from Bar bar1_)) and
(foo0_.fooId not in (select baz2_.fooId from Baz baz2_))
Will fail because the field "foo0_.fooId" should be "fooId",
"foo0_" is not declared.
At test case is attached.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: