[hibernate-issues] [Hibernate-JIRA] Created: (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


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