diff --git a/framework/common/config/general.properties b/framework/common/config/general.properties index e77ae9d8d8..40976b5fe7 100644 --- a/framework/common/config/general.properties +++ b/framework/common/config/general.properties @@ -131,6 +131,8 @@ mail.spam.value=YES # -- HTTP JSON settings http.json.xssi.prefix=// +# -- Save Entity Sync Remove Info. This is used in the context of Entity Sync, doc currently updated, WIP at OFBIZ-10390... +saveEntitySyncRemoveInfo=false # -- Y if you want to display the multi-tenant textbox in the login page and install specify components which related to each tenant multitenant=N 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 d950824f42..ac9b79d8f8 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 @@ -47,6 +47,7 @@ import org.apache.ofbiz.base.util.UtilFormatOut; import org.apache.ofbiz.base.util.UtilGenerics; import org.apache.ofbiz.base.util.UtilMisc; import org.apache.ofbiz.base.util.UtilObject; +import org.apache.ofbiz.base.util.UtilProperties; import org.apache.ofbiz.base.util.UtilValidate; import org.apache.ofbiz.base.util.UtilXml; import org.apache.ofbiz.entity.cache.Cache; @@ -96,6 +97,8 @@ public class GenericDelegator implements Delegator { protected ModelGroupReader modelGroupReader = null; /** This flag is only here for lower level technical testing, it shouldn't be user configurable (or at least I don't think so yet); when true all operations without a transaction will be wrapped in one; seems to be necessary for some (all?) XA aware connection pools, and should improve overall stability and consistency */ public static final boolean alwaysUseTransaction = true; + // TODO should this is be handled by tenant? + public static final boolean saveEntitySyncRemoveInfo = UtilProperties.getPropertyAsBoolean("general", "saveEntitySyncRemove", false); protected String delegatorBaseName = null; protected String delegatorFullName = null; @@ -1053,7 +1056,9 @@ public class GenericDelegator implements Delegator { } } - this.saveEntitySyncRemoveInfo(value.getPrimaryKey()); + if (saveEntitySyncRemoveInfo) { + this.saveEntitySyncRemoveInfo(value.getPrimaryKey()); + } ecaRunner.evalRules(EntityEcaHandler.EV_RETURN, EntityEcaHandler.OP_REMOVE, value, false); TransactionUtil.commit(beganTransaction);