[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-6759) Null properties mapped as boolean cause exception on Oracle

Gail Badner (JIRA) noreply at atlassian.com
Fri Oct 21 18:59:20 EDT 2011


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

Gail Badner commented on HHH-6759:
----------------------------------

This issue is reproduced by:

org.hibernate.test.annotations.entity.Java5FeaturesTest.testEnums
org.hibernate.test.annotations.manytoone.ManyToOneTest.testEager

> Null properties mapped as boolean cause exception on Oracle
> -----------------------------------------------------------
>
>                 Key: HHH-6759
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6759
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: core
>            Reporter: Gail Badner
>            Assignee: Gail Badner
>             Fix For: 4.0.0.next
>
>
> When PreparedStatement.setNull(index, java.sql.BOOLEAN) is called using Oracle, this exception is thrown:
> java.sql.SQLException: Invalid column type: 16
> Types.BOOLEAN is defined as 16.
> The fix is to use Types.BIT instead of Types.BOOLEAN.
> This is done by overriding Dialect.getSqlTypeDescriptorOverride(int sqlCode) in Orcle8iDialect to return BitTypeDescriptor when sqlCode is Types.BOOLEAN.

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