From noreply at atlassian.com Thu Mar 4 14:49:49 2010 Content-Type: multipart/mixed; boundary="===============1933820925076762002==" MIME-Version: 1.0 From: Ray Fan (JIRA) To: hibernate-issues at lists.jboss.org Subject: [hibernate-issues] [Hibernate-JIRA] Created: (HHH-4973) org.hibernate.test.hql.ASTParserLoadingTest error running testSelectClauseSubselect with Ingres Date: Thu, 04 Mar 2010 13:49:48 -0600 Message-ID: <1731241979.1348.1267732188098.JavaMail.j2ee-opensource-projects@vps07.contegix.com> --===============1933820925076762002== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable org.hibernate.test.hql.ASTParserLoadingTest error running testSelectClauseS= ubselect with Ingres ---------------------------------------------------------------------------= -------------------- Key: HHH-4973 URL: http://opensource.atlassian.com/projects/hibernate/br= owse/HHH-4973 Project: Hibernate Core Issue Type: Bug Components: testsuite Affects Versions: 3.5.0-CR-2 Environment: Hibernate 3.5.0-CR-2, Ingres 9.3.1 (int.lnx/106), Ing= res9Dialect Reporter: Ray Fan Attachments: hql-astparserloadingtest.zip Error executing testSelectClauseSubselect in org.hibernate.test.hql.ASTPars= erLoadingTest with an Ingres exception {noformat} org.hibernate.exception.SQLGrammarException: could not= execute query at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.= java:91) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHel= per.java:66) at org.hibernate.loader.Loader.doList(Loader.java:2257) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2151) at org.hibernate.loader.Loader.list(Loader.java:2146) at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:448) at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.j= ava:363) at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.jav= a:196) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1258) at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102) at org.hibernate.test.hql.ASTParserLoadingTest.testSelectClauseSubselec= t(ASTParserLoadingTest.java:1057) Caused by: com.ingres.gcf.util.SqlEx: A contained a 'animal0_' which did not correspond to any of the s within whose scope the appeared. at com.ingres.gcf.jdbc.DrvObj.readError(Unknown Source) at com.ingres.gcf.jdbc.DrvObj.readResults(Unknown Source) at com.ingres.gcf.jdbc.DrvPrep.prepare(Unknown Source) at com.ingres.gcf.jdbc.DrvConn.createPrepStmt(Unknown Source) at com.ingres.gcf.jdbc.JdbcPrep.(Unknown Source) at com.ingres.gcf.jdbc.JdbcConn.createPrep(Unknown Source) at com.ingres.gcf.jdbc.JdbcConn.prepareStatement(Unknown Source) at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatc= her.java:534) at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatc= her.java:452) at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBat= cher.java:161) at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1597) at org.hibernate.loader.Loader.doQuery(Loader.java:718) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(L= oader.java:271) at org.hibernate.loader.Loader.doList(Loader.java:2254) ... 38 more {noformat} The SQL query that is produced references animal0_ in the WHERE clause of t= he sub-select. {noformat} select (select max(zoo1_.id) from Zoo zoo1_ where animal0_.zoo_id=3Dzoo1_.id) as col_0_0_ from Animal animal0_ {noformat} Once the scoping error is removed a more fundamental error is exposed "Sub-= selects are not supported within select target lists." -- = This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: htt= p://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira =20 --===============1933820925076762002==--