[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2609) Delete with multiple nested sub-queries generates invalid SQL (on Postgresql)
Adam Dyga (JIRA)
noreply at atlassian.com
Fri Nov 27 21:42:16 EST 2009
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2609?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=34791#action_34791 ]
Adam Dyga commented on HHH-2609:
--------------------------------
Yes, this seems to be exaclty the same issue as I reported in http://opensource.atlassian.com/projects/hibernate/browse/HHH-3224
> 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: 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