From 7bc3ac4f871a79897396bd245b275740feb2a986 Mon Sep 17 00:00:00 2001 From: Nicolas Malin Date: Thu, 5 Sep 2019 16:46:20 +0000 Subject: [PATCH] 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 --- .../main/java/org/apache/ofbiz/entity/GenericDelegator.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/framework/entity/src/main/java/org/apache/ofbiz/entity/GenericDelegator.java b/framework/entity/src/main/java/org/apache/ofbiz/entity/GenericDelegator.java index 5e4c0850bd..7cdfbcfb0b 100644 --- a/framework/entity/src/main/java/org/apache/ofbiz/entity/GenericDelegator.java +++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/GenericDelegator.java @@ -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) {