[hibernate-commits] Hibernate SVN: r14493 - in core/trunk/testsuite/src/test/java/org/hibernate/test/manytomanyassociationclass: surrogateid/generated and 1 other directory.

hibernate-commits at lists.jboss.org hibernate-commits at lists.jboss.org
Wed Apr 2 23:49:05 EDT 2008


Author: gbadner
Date: 2008-04-02 23:49:05 -0400 (Wed, 02 Apr 2008)
New Revision: 14493

Modified:
   core/trunk/testsuite/src/test/java/org/hibernate/test/manytomanyassociationclass/compositeid/Mappings.hbm.xml
   core/trunk/testsuite/src/test/java/org/hibernate/test/manytomanyassociationclass/surrogateid/generated/ManyToManyAssociationClassGeneratedIdTest.java
Log:
HHH-2801 : changes so tests work on all tested dialects


Modified: core/trunk/testsuite/src/test/java/org/hibernate/test/manytomanyassociationclass/compositeid/Mappings.hbm.xml
===================================================================
--- core/trunk/testsuite/src/test/java/org/hibernate/test/manytomanyassociationclass/compositeid/Mappings.hbm.xml	2008-04-03 03:43:21 UTC (rev 14492)
+++ core/trunk/testsuite/src/test/java/org/hibernate/test/manytomanyassociationclass/compositeid/Mappings.hbm.xml	2008-04-03 03:49:05 UTC (rev 14493)
@@ -58,11 +58,9 @@
         </composite-id>
         <property name="name" column="NAME" type="string" length="40" not-null="true"/>
         <many-to-one column="USER_ID" name="user" class="org.hibernate.test.manytomanyassociationclass.User"
-                not-null="true" unique-key="UK_MEMBERSHIP"
-                insert="false" update="false"/>
+                not-null="true" insert="false" update="false"/>
         <many-to-one column="GROUP_ID" name="group" class="org.hibernate.test.manytomanyassociationclass.Group"
-                not-null="true" unique-key="UK_MEMBERSHIP"
-                insert="false" update="false"/>
+                not-null="true" insert="false" update="false"/>
     </class>
 
 </hibernate-mapping>

Modified: core/trunk/testsuite/src/test/java/org/hibernate/test/manytomanyassociationclass/surrogateid/generated/ManyToManyAssociationClassGeneratedIdTest.java
===================================================================
--- core/trunk/testsuite/src/test/java/org/hibernate/test/manytomanyassociationclass/surrogateid/generated/ManyToManyAssociationClassGeneratedIdTest.java	2008-04-03 03:43:21 UTC (rev 14492)
+++ core/trunk/testsuite/src/test/java/org/hibernate/test/manytomanyassociationclass/surrogateid/generated/ManyToManyAssociationClassGeneratedIdTest.java	2008-04-03 03:49:05 UTC (rev 14493)
@@ -69,6 +69,7 @@
 			// will be thrown on the insert because the unique constraint on the
 			// user and group IDs in the join table is violated. See HHH-2801.
 			s.merge( getUser() );
+			s.getTransaction().commit();
 			fail( "should have failed because inserts are before deletes");
 		}
 		catch( ConstraintViolationException ex ) {
@@ -95,6 +96,7 @@
 			// will be thrown on the insert because the unique constraint on the
 			// user and group IDs in the join table is violated. See HHH-2801.
 			s.merge( getUser() );
+			s.getTransaction().commit();
 			fail( "should have failed because inserts are before deletes");
 		}
 		catch( ConstraintViolationException ex ) {
@@ -121,6 +123,7 @@
 			// will be thrown on the insert because the unique constraint on the
 			// user and group IDs in the join table is violated. See HHH-2801.
 			s.merge( getUser() );
+			s.getTransaction().commit();
 			fail( "should have failed because inserts are before deletes");
 		}
 		catch( ConstraintViolationException ex ) {




More information about the hibernate-commits mailing list