mirror of
https://gitee.com/jmix/cuba.git
synced 2024-12-05 04:38:10 +08:00
PL-10354 The query "delete from ..." through EntityManager removes entities without soft deletion
This commit is contained in:
parent
5cace0c5c2
commit
5ecfd4f768
@ -606,6 +606,8 @@ public class QueryTest {
|
||||
try {
|
||||
em.setSoftDeletion(false);
|
||||
em.createQuery("delete from sys$FileDescriptor f").executeUpdate();
|
||||
} catch (javax.persistence.PersistenceException e) {
|
||||
//It's OK integrity constraint violation
|
||||
} finally {
|
||||
em.setSoftDeletion(true);
|
||||
}
|
||||
@ -613,6 +615,8 @@ public class QueryTest {
|
||||
try {
|
||||
AppContext.setProperty("cuba.enableDeleteStatementInSoftDeleteMode", "true");
|
||||
em.createQuery("delete from sys$FileDescriptor f").executeUpdate();
|
||||
} catch (javax.persistence.PersistenceException e) {
|
||||
//It's OK integrity constraint violation
|
||||
} finally {
|
||||
AppContext.setProperty("cuba.enableDeleteStatementInSoftDeleteMode", "false");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user