Java Mailing List Archive

http://www.gg3721.com/

Home » Hibernate Issues List »

[hibernate-issues] [Hibernate-JIRA] Updated: (HHH-4907) Support for
tuple syntax in HQL/Criteria on databases which do not support tuple syntax

Anupam M (JIRA)

2010-03-10

Replies: Find Java Web Hosting

Author LoginPost Reply

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

Strong Liu updated HHH-4907:
----------------------------

  Attachment: hhh-4907.patch

I'd think this patch(hhh-4907.patch) fixes tuple with "in" operation in Criteria, but this issue also affects HQL, there is a FailureExpected test in the patch to show this, unfortunately I don't know how to fix it, is it relates to antlr?

> Support for tuple syntax in HQL/Criteria on databases which do not support tuple syntax
> ---------------------------------------------------------------------------------------
>
>           Key: HHH-4907
>           URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4907
>         Project: Hibernate Core
>       Issue Type: Improvement
>       Components: core
>   Affects Versions: 3.5.0-CR-1
>      Environment: ms sql server, sybase, db2
>        Reporter: Strong Liu
>        Assignee: Strong Liu
>      Attachments: hhh-4907.patch
>
>  Original Estimate: 0 minutes
> Remaining Estimate: 0 minutes
>
> [http://hudson.qa.jboss.com/hudson/view/Hibernate%20Community/job/hibernate-core-trunk/database=mssql2005,jdk=java15_default,label=hibernate/lastCompletedBuild/testReport/org.hibernate.test.annotations.cid/CompositeIdTest/testQueryInAndComposite/ ]
> org.hibernate.exception.SQLGrammarException: could not execute query
>  at org.hibernate.exception.SQLStateConverter.convert (SQLStateConverter.java:91)
>  at org.hibernate.exception.JDBCExceptionHelper.convert (JDBCExceptionHelper.java:66)
>  at org.hibernate.loader.Loader.doList (Loader.java:2276)
>  at org.hibernate.loader.Loader.listIgnoreQueryCache (Loader.java:2151)
>  at org.hibernate.loader.Loader.list (Loader.java:2146)
>  at org.hibernate.loader.criteria.CriteriaLoader.list (CriteriaLoader.java:118)
>  at org.hibernate.impl.SessionImpl.list (SessionImpl.java:1706)
>  at org.hibernate.impl.CriteriaImpl.list (CriteriaImpl.java:347)
>  at org.hibernate.test.annotations.cid.CompositeIdTest.testQueryInAndComposite(CompositeIdTest.java:306)
> Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near ','.
>  at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:156)
>  at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1373)
>  at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:371)
>  at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:322)
>  at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4003)
>  at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1550)
>  at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:160)
>  at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:133)
>  at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(SQLServerPreparedStatement.java:265)
>  at org.hibernate.jdbc.AbstractBatcher.getResultSet (AbstractBatcher.java:208)
>  at org.hibernate.loader.Loader.getResultSet (Loader.java:1832)
>  at org.hibernate.loader.Loader.doQuery (Loader.java:719)
>  at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections (Loader.java:271)
>  at org.hibernate.loader.Loader.doList (Loader.java:2273)
>  ... 32 more

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

   
_______________________________________________
hibernate-issues mailing list
hibernate-issues@(protected)
https://lists.jboss.org/mailman/listinfo/hibernate-issues
©2008 gg3721.com - Jax Systems, LLC, U.S.A.