[hibernate-issues] [Hibernate-JIRA] Assigned: (HHH-4912) testManyToManyWithFormula induces error with Ingres dialect

Strong Liu (JIRA) noreply at atlassian.com
Tue Mar 9 15:44:49 EST 2010


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

Strong Liu reassigned HHH-4912:
-------------------------------

    Assignee: Strong Liu

> testManyToManyWithFormula induces error with Ingres dialect
> -----------------------------------------------------------
>
>                 Key: HHH-4912
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4912
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: query-hql
>    Affects Versions: 3.5.0-Beta-4
>         Environment: Hibernate 3.5.0-Beta-4, Ingres 9.3.1
>            Reporter: Ray Fan
>            Assignee: Strong Liu
>         Attachments: manytomany-logs.zip
>
>
> During test org.hibernate.test.manytomany.ManyToManyTest an error is encountered when using the Ingres dialect.
> {noformat}
> testcase time="0.806" classname="org.hibernate.test.manytomany.ManyToManyTest" name="testManyToManyWithFormula">
>     <error message="could not execute query" type="org.hibernate.exception.GenericJDBCException">org.hibernate.exception.GenericJDBCException: could not execute query
>     at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:132)
>     at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:120)
>     at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.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.java:363)
>     at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
>     at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1258)
>     at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
>     at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:859)
>     at org.hibernate.test.manytomany.ManyToManyTest.testManyToManyWithFormula(ManyToManyTest.java:92)
> Caused by: com.ingres.gcf.util.SqlEx: line 1, Column &apos;username&apos; found in more than one FROM list table.
>     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.&lt;init&gt;(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(AbstractBatcher.java:534)
>     at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:452)
>     at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.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(Loader.java:271)
>     at org.hibernate.loader.Loader.doList(Loader.java:2254)
>     ... 39 more
> {noformat}
> The generated SQL query from HQL: from org.hibernate.test.manytomany.User u join fetch u.groups g join fetch g.users
> {noformat}
>     select
>         user0_.name as name3854_0_,
>         user0_.org as org3854_0_,
>         group2_.name as name3856_1_,
>         group2_.org as org3856_1_,
>         user4_.name as name3854_2_,
>         user4_.org as org3854_2_,
>         group2_.description as descript3_3856_1_,
>         groups1_.userName as userName0__,
>         groups1_.org as org0__,
>         groups1_.groupName as groupName0__,
>         groups1_.org as formula31_0__,
>         users3_.groupName as groupName1__,
>         users3_.org as org1__,
>         userName as userName1__,
>         users3_.org as formula32_1__ 
>     from
>         'User' user0_ 
>     inner join
>         UserGroup groups1_ 
>             on user0_.name=groups1_.userName 
>             and user0_.org=groups1_.org 
>     inner join
>         'Group' group2_ 
>             on groups1_.groupName=group2_.name 
>             and groups1_.org=group2_.org 
>     inner join
>         UserGroup users3_ 
>             on group2_.name=users3_.groupName 
>             and group2_.org=users3_.org 
>     inner join
>         'User' user4_ 
>             on users3_.userName=user4_.name 
>             and users3_.org=user4_.org
> {noformat}
> seems to includes userName as userName1__ in the select list without table qualification.  Ingres is unable to disambiguate the column from groups1_ or users3_ and raises the error.
> Attaching test logs.

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