From: Michael K. (JIRA) <no...@at...> - 2006-05-18 12:49:14
|
HQL Alias Regression -------------------- Key: HHH-1765 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1765 Project: Hibernate3 Type: Bug Components: query-hql Versions: 3.1.3 Reporter: Michael Kopp 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 |