From a9eb35a4c2da8acabda0b0d711d09937235ae469 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Mon, 9 Jul 2018 21:33:18 +0200 Subject: [PATCH] IDEMPIERE-2857 Improve transaction names for deletes / integrate peer reviewed patch from Nicolas Micoud (nmicoud) / IDEMPIERE-3416 --- org.adempiere.base/src/org/compiere/model/PO.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/org.adempiere.base/src/org/compiere/model/PO.java b/org.adempiere.base/src/org/compiere/model/PO.java index 9496ab6025..f1de8670b8 100644 --- a/org.adempiere.base/src/org/compiere/model/PO.java +++ b/org.adempiere.base/src/org/compiere/model/PO.java @@ -2069,7 +2069,10 @@ public abstract class PO l_trxname.setLength(23); m_trxName = Trx.createTrxName(l_trxname.toString()); localTrx = Trx.get(m_trxName, true); - localTrx.setDisplayName(getClass().getName()+"_save"); + if (newRecord) + localTrx.setDisplayName(getClass().getName() + "_insert"); + else + localTrx.setDisplayName(getClass().getName() + "_update_ID" + get_ID()); localTrx.getConnection(); } else @@ -3216,7 +3219,7 @@ public abstract class PO { localTrxName = Trx.createTrxName("POdel"); localTrx = Trx.get(localTrxName, true); - localTrx.setDisplayName(getClass().getName()+"_delete"); + localTrx.setDisplayName(getClass().getName()+ "_delete_ID" + get_ID()); localTrx.getConnection(); m_trxName = localTrxName; }