Implemented: Add a mechanism to prevent the usage of EntitySyncRemove

(OFBIZ-10008)

Complete the previous commit on revision 1835296 [1] to add mechanism to prevent
 the usage of EntitySyncRemove also on function Delegator.removeByPrimaryKey

[1] https://svn.apache.org/viewvc?view=revision&revision=1835296

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1866479 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nicolas Malin
2019-09-05 16:46:20 +00:00
parent 87064f2358
commit 7bc3ac4f87
@@ -1,3 +1,4 @@
/*
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -985,7 +986,9 @@ public class GenericDelegator implements Delegator {
ecaRunner.evalRules(EntityEcaHandler.EV_CACHE_CLEAR, EntityEcaHandler.OP_REMOVE, primaryKey, false);
this.clearCacheLine(primaryKey);
this.saveEntitySyncRemoveInfo(primaryKey);
if (saveEntitySyncRemoveInfo) {
this.saveEntitySyncRemoveInfo(primaryKey);
}
if (testMode) {
if (removedEntity != null) {