HHH-2801 : changes so tests work on all tested dialects

git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@14493 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
Gail Badner 2008-04-03 03:49:05 +00:00
parent cb2d5fee72
commit b3428358b7
2 changed files with 5 additions and 4 deletions

View File

@ -58,11 +58,9 @@
</composite-id> </composite-id>
<property name="name" column="NAME" type="string" length="40" not-null="true"/> <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" <many-to-one column="USER_ID" name="user" class="org.hibernate.test.manytomanyassociationclass.User"
not-null="true" unique-key="UK_MEMBERSHIP" not-null="true" insert="false" update="false"/>
insert="false" update="false"/>
<many-to-one column="GROUP_ID" name="group" class="org.hibernate.test.manytomanyassociationclass.Group" <many-to-one column="GROUP_ID" name="group" class="org.hibernate.test.manytomanyassociationclass.Group"
not-null="true" unique-key="UK_MEMBERSHIP" not-null="true" insert="false" update="false"/>
insert="false" update="false"/>
</class> </class>
</hibernate-mapping> </hibernate-mapping>

View File

@ -69,6 +69,7 @@ public class ManyToManyAssociationClassGeneratedIdTest extends AbstractManyToMan
// will be thrown on the insert because the unique constraint on the // 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. // user and group IDs in the join table is violated. See HHH-2801.
s.merge( getUser() ); s.merge( getUser() );
s.getTransaction().commit();
fail( "should have failed because inserts are before deletes"); fail( "should have failed because inserts are before deletes");
} }
catch( ConstraintViolationException ex ) { catch( ConstraintViolationException ex ) {
@ -95,6 +96,7 @@ public class ManyToManyAssociationClassGeneratedIdTest extends AbstractManyToMan
// will be thrown on the insert because the unique constraint on the // 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. // user and group IDs in the join table is violated. See HHH-2801.
s.merge( getUser() ); s.merge( getUser() );
s.getTransaction().commit();
fail( "should have failed because inserts are before deletes"); fail( "should have failed because inserts are before deletes");
} }
catch( ConstraintViolationException ex ) { catch( ConstraintViolationException ex ) {
@ -121,6 +123,7 @@ public class ManyToManyAssociationClassGeneratedIdTest extends AbstractManyToMan
// will be thrown on the insert because the unique constraint on the // 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. // user and group IDs in the join table is violated. See HHH-2801.
s.merge( getUser() ); s.merge( getUser() );
s.getTransaction().commit();
fail( "should have failed because inserts are before deletes"); fail( "should have failed because inserts are before deletes");
} }
catch( ConstraintViolationException ex ) { catch( ConstraintViolationException ex ) {