[hibernate-issues] [Hibernate-JIRA] Commented: (ANN-822) org.hibernate.test.annotations.EntityTest fails because DB2 does not support unique constraints on nullable columns

Juraci Paixao Krohling (JIRA) noreply at atlassian.com
Thu Apr 23 05:56:17 EDT 2009


    [ http://opensource.atlassian.com/projects/hibernate/browse/ANN-822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=32996#action_32996 ] 

Juraci Paixao Krohling commented on ANN-822:
--------------------------------------------

Backported to v3_2_1_GA_CP and v3_4_0_GA_CP.

> org.hibernate.test.annotations.EntityTest fails because DB2 does not support unique constraints on nullable columns
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: ANN-822
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-822
>             Project: Hibernate Annotations
>          Issue Type: Bug
>          Components: binder
>    Affects Versions: 3.4.0.GA
>            Reporter: Gail Badner
>             Fix For: 3.5
>
>         Attachments: ANN-822.diff
>
>
> The following org.hibernate.test.annotations.EntityTest tests fail on DB2:
>     testColumnUnique()
>     testUniqueConstraint()
> DB2 does not support unique constraints on nullable columns. DB2 does support unique indexes on nullable columns, but only be 1 null value is allowed. (DB2 for z/OS does appear to allow multiple null values; is that a different dialect?)
> When DB2Dialect is used, Hibernate does not create unique constraints or indexes on nullable columns. This is why the expected constraint violations do not occur in the tests. The tests give an erroneous message "org.hibernate.TransactionException: Transaction not successfully started" because an attempt is made to rollback the transaction after it was successfully committed.

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