Bug 1077240

Summary: [HHH-9054] org.hibernate.test.annotations.quote.QuoteTest violates unique key constraint on some DBs
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Jan Martiska <jmartisk>
Component: HibernateAssignee: Brett Meyer <brmeyer>
Status: CLOSED CURRENTRELEASE QA Contact: Jan Martiska <jmartisk>
Severity: medium Docs Contact: Russell Dickenson <rdickens>
Priority: unspecified    
Version: 6.3.0CC: msimka, theute
Target Milestone: DR6   
Target Release: EAP 6.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-28 15:27:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1073085    

Description Jan Martiska 2014-03-17 14:55:34 UTC
(testsuite-only issue)

Two tests in QuoteTest (testQuoteManytoMany, testDoubleQuoteJoinColumn) each create one instance of User which has house3=null. House3 column has a @UniqueConstraint. On some databases, unique (without not-null) constraint allows multiple null values to be in the column, but some databases disallow it (DB2, Sybase, MSSQL..). On these databases, testQuoteManytoMany fails - it violates the constraint, because  testDoubleQuoteJoinColumn persisted a User with house3=null.

Comment 1 Brett Meyer 2014-03-17 19:21:50 UTC
Corrected upstream and will be a part of the ORM component upgrade in 1073085

Comment 2 Brett Meyer 2014-03-17 19:22:25 UTC
Test-only fix -- no docs required

Comment 4 Martin Simka 2014-04-01 11:30:13 UTC
verified on EAP 6.3.0.DR6