File tree Expand file tree Collapse file tree 2 files changed +2
-12
lines changed
hibernate-core/src/test/java/org/hibernate/orm/test/records Expand file tree Collapse file tree 2 files changed +2
-12
lines changed Original file line number Diff line number Diff line change 28
28
public class MergeRecordEmbeddedIdTest {
29
29
@ AfterEach
30
30
protected void cleanupTest (SessionFactoryScope scope ) {
31
- scope .inTransaction ( session -> {
32
- // Some dialects (e.g. Firebird) (can) fail for a non-cascaded foreign key depending on actual row order
33
- // Clear foreign key before delete
34
- session .createMutationQuery ( "update MyEntity set associatedEntity = null" ).executeUpdate ();
35
- session .createMutationQuery ( "delete from MyEntity" ).executeUpdate ();
36
- } );
31
+ scope .getSessionFactory ().getSchemaManager ().truncateMappedObjects ();
37
32
}
38
33
39
34
@ Test
Original file line number Diff line number Diff line change 28
28
public class RecordIdClassTest {
29
29
@ AfterEach
30
30
protected void cleanupTest (SessionFactoryScope scope ) {
31
- scope .inTransaction ( session -> {
32
- // Some dialects (e.g. Firebird) (can) fail for a non-cascaded foreign key depending on actual row order
33
- // Clear foreign key before delete
34
- session .createMutationQuery ( "update MyEntity set associatedEntity = null" ).executeUpdate ();
35
- session .createMutationQuery ( "delete from MyEntity" ).executeUpdate ();
36
- } );
31
+ scope .getSessionFactory ().getSchemaManager ().truncateMappedObjects ();
37
32
}
38
33
39
34
@ Test
You can’t perform that action at this time.
0 commit comments