mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-07 11:48:18 +00:00
HHH-12592 : add assertions to ensure that the detached and merged collection are not the same, which currently fails
This commit is contained in:
parent
80bf92e32a
commit
c3c0cd550f
@ -14,6 +14,7 @@
|
||||
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
|
||||
|
||||
import static org.hibernate.testing.transaction.TransactionUtil.doInHibernate;
|
||||
import static org.junit.Assert.assertNotSame;
|
||||
|
||||
/**
|
||||
* @author Chris Cranford
|
||||
@ -37,7 +38,10 @@ public void testMergeDetachedOrphanRemoval() {
|
||||
|
||||
doInHibernate( this::sessionFactory, session -> {
|
||||
entity.setName( "updated" );
|
||||
session.merge( entity );
|
||||
Root entityMerged = (Root) session.merge( entity );
|
||||
assertNotSame( entity, entityMerged );
|
||||
assertNotSame( entity, entityMerged );
|
||||
assertNotSame( entity.getLeaves(), entityMerged.getLeaves() );
|
||||
} );
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user