[hibernate-issues] [Hibernate-JIRA] Resolved: (HHH-1765) HQL Alias Regression

Diego Pires Plentz (JIRA) noreply at atlassian.com
Fri Oct 12 22:10:39 EDT 2007


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1765?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Diego Pires Plentz resolved HHH-1765.
-------------------------------------

      Assignee: Diego Pires Plentz
    Resolution: Duplicate

> HQL Alias Regression
> --------------------
>
>                 Key: HHH-1765
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1765
>             Project: Hibernate3
>          Issue Type: Bug
>          Components: query-hql
>    Affects Versions: 3.1.3
>            Reporter: Michael Kopp
>            Assignee: Diego Pires Plentz
>
> The following query worked fine in Hibernate 3.1.2
>         delete TokenConnection tc where exists
>         (
>             from Token as tok where rc.source = tok.id and tok.workflowInstance = ?
>         )
> In Hibernate 3.1.3 I get an error because the FROM_TOKEN_ID column is invalid. That column is mapped to tc.source. I found out that the resulting SQL is:
> delete from FT_WF_TKTN where exists 
> (select token1_.TOKEN_ID from FT_WF_TOKN token1_ where tokenconne0_.FROM_TOKEN_ID=token1_.TOKEN_ID and token1_.INSTANCE_ID=?)
> Which can of course not work because the tokenconne0_ alias is not defined. it should be 
> delete from FT_WF_TKTN tokenconne0_ where exists 
> (select token1_.TOKEN_ID from FT_WF_TOKN token1_ where tokenconne0_.FROM_TOKEN_ID=token1_.TOKEN_ID and token1_.INSTANCE_ID=?)

-- 
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