Author: nmalin Date: Thu Sep 5 16:46:20 2019 New Revision: 1866479 URL: http://svn.apache.org/viewvc?rev=1866479&view=rev Log: 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 Modified: ofbiz/ofbiz-framework/branches/release18.12/framework/entity/src/main/java/org/apache/ofbiz/entity/GenericDelegator.java Modified: ofbiz/ofbiz-framework/branches/release18.12/framework/entity/src/main/java/org/apache/ofbiz/entity/GenericDelegator.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/branches/release18.12/framework/entity/src/main/java/org/apache/ofbiz/entity/GenericDelegator.java?rev=1866479&r1=1866478&r2=1866479&view=diff ============================================================================== --- ofbiz/ofbiz-framework/branches/release18.12/framework/entity/src/main/java/org/apache/ofbiz/entity/GenericDelegator.java (original) +++ ofbiz/ofbiz-framework/branches/release18.12/framework/entity/src/main/java/org/apache/ofbiz/entity/GenericDelegator.java Thu Sep 5 16:46:20 2019 @@ -1,4 +1,5 @@ /* +/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -985,7 +986,9 @@ public class GenericDelegator implements 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) {

