[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-6748) Test failures due to inconsistent return type of numeric from native query

Gail Badner (JIRA) noreply at atlassian.com
Wed Oct 19 18:00:19 EDT 2011


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

Gail Badner commented on HHH-6748:
----------------------------------

The following tests fail on Oracle because because a Oracle returns a Types.Numeric value, which is mapped to BigDecimalType; H2 returns a Types.DOUBLE value.

org.hibernate.test.component.basic.ComponentTest.testCustomColumnReadAndWrite
org.hibernate.test.instrument.runtime.JavassistInstrumentationTest.testCustomColumnReadAndWrite
org.hibernate.test.annotations.various.readwriteexpression.ColumnTransformerTest.testCustomColumnReadAndWrite
org.hibernate.test.hql.ASTParserLoadingTest.testLoadSnapshotWithCustomColumnReadAndWrite
org.hibernate.test.joinedsubclass.JoinedSubclassTest.testCustomColumnReadAndWrite
org.hibernate.test.subselect.SubselectTest.testCustomColumnReadAndWrite
org.hibernate.test.unionsubclass2.UnionSubclassTest.testCustomColumnReadAndWrite

Fix will cast result to Number, then call Number.doubleValue().


> Test failures due to inconsistent return type of  numeric from native query
> ---------------------------------------------------------------------------
>
>                 Key: HHH-6748
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6748
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: testsuite
>    Affects Versions: 4.0.0.CR4
>            Reporter: Gail Badner
>            Assignee: Gail Badner
>             Fix For: 4.0.0.next
>
>
> JoinedSubclassAndSecondaryTable.testSecondaryTableAndJoined() fails on Oracle, DB2, and MSSQL because return type of count(*)  depends on dialect (e.g., Oracle returns Types.NUMERIC value, which is mapped to BigDecimalType; H2 returns Types.BIGINT value). Fix will be to cast result to Number, then call Number.longValue().

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list