BF [ 2849122 ] PO.AfterSave is not rollback on error
https://sourceforge.net/tracker/?func=detail&aid=2849122&group_id=176962&atid=879332 Using a trx that was previously closed or never opened Creating and starting the transaction right here, but please note that this is not a good practice
This commit is contained in:
parent
dceebebb1d
commit
41235d67e2
|
@ -1954,6 +1954,14 @@ public abstract class PO
|
|||
else
|
||||
{
|
||||
trx = Trx.get(m_trxName, false);
|
||||
if (trx == null)
|
||||
{
|
||||
// Using a trx that was previously closed or never opened
|
||||
// Creating and starting the transaction right here, but please note
|
||||
// that this is not a good practice
|
||||
trx = Trx.get(m_trxName, true);
|
||||
log.warning("Transaction closed or never opened ("+m_trxName+") => starting now");
|
||||
}
|
||||
}
|
||||
|
||||
// Before Save
|
||||
|
|
Loading…
Reference in New Issue