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

Emmanuel Bernard (JIRA) noreply at atlassian.com
Thu Apr 23 01:57:17 EDT 2009


     [ http://opensource.atlassian.com/projects/hibernate/browse/ANN-822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Bernard resolved ANN-822.
----------------------------------

    Resolution: Fixed

Fixed by adding nulalble=false on unique columns

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