HHH-12592 : add assertions to ensure that the detached and merged collection are not the same, which currently fails
(cherry picked from commit c3c0cd550f
)
This commit is contained in:
parent
cf891dbe92
commit
e171ae965c
|
@ -14,6 +14,7 @@ import org.hibernate.testing.bytecode.enhancement.BytecodeEnhancerRunner;
|
||||||
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
|
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
|
||||||
|
|
||||||
import static org.hibernate.testing.transaction.TransactionUtil.doInHibernate;
|
import static org.hibernate.testing.transaction.TransactionUtil.doInHibernate;
|
||||||
|
import static org.junit.Assert.assertNotSame;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Chris Cranford
|
* @author Chris Cranford
|
||||||
|
@ -37,7 +38,10 @@ public class MergeEnhancedDetachedOrphanRemovalTest extends BaseCoreFunctionalTe
|
||||||
|
|
||||||
doInHibernate( this::sessionFactory, session -> {
|
doInHibernate( this::sessionFactory, session -> {
|
||||||
entity.setName( "updated" );
|
entity.setName( "updated" );
|
||||||
session.merge( entity );
|
Root entityMerged = (Root) session.merge( entity );
|
||||||
|
assertNotSame( entity, entityMerged );
|
||||||
|
assertNotSame( entity, entityMerged );
|
||||||
|
assertNotSame( entity.getLeaves(), entityMerged.getLeaves() );
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue