[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4266) Unit tests fail because Insert into ... values(upper(?)) fails on DB2

Strong Liu (JIRA) noreply at atlassian.com
Thu Mar 25 15:07:31 EDT 2010


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=35961#action_35961 ] 

Strong Liu commented on HHH-4266:
---------------------------------

I'd think this relates to https://jira.jboss.org/jira/browse/JBPAPP-948
{quote}
DB2 does not support untyped parameters. The queries need to be modified so that the parameters are cast to an appropriate data type, as in:
- "from Human where cast(? as string) is null"
- "from Animal where lower(upper(cast(:foo as string))) like 'f%'" 
{quote}

Emmanuel, would you please take a look of this issue?




> Unit tests fail because Insert into ... values(upper(?)) fails on DB2
> ---------------------------------------------------------------------
>
>                 Key: HHH-4266
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4266
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: annotations
>            Reporter: Gail Badner
>            Assignee: Emmanuel Bernard
>
> The following tests fail with DB2Dialect:
>    org.hibernate.test.annotations.join.JoinTest.testFetchModeOnSecondaryTable()
>    org.hibernate.test.annotations.join.JoinTest.testCustomSQL()
> due to failure on:
>     insert into Cat2 (storyPart2, id) values (upper(?), ?)
> The following tests fail:
>   org.hibernate.test.annotations.query.QueryAndSQLTest.testEntitySQLOverriding()
>   org.hibernate.test.annotations.query.QueryAndSQLTest.testCollectionSQLOverriding()
> due to failure on:
>   INSERT INTO CHAOS(name, nick_name, chaos_size, id) VALUES(upper(?),?,?,?)
> The tests pass if upper(?) is changed to upper(? || ''), but this may not work on all dialects.

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