#805 - ENH: Add BeanState.resetForInsert() ... This resets bean state such that a save() results in an insert

This commit is contained in:
Robin Bygrave
2016-08-04 22:49:07 +12:00
parent 876476fdc1
commit 08e46d6bf3
11 changed files with 114 additions and 17 deletions
@@ -29,10 +29,9 @@ public class ScopedTransaction implements SpiTransaction {
public ScopedTransaction(ScopeTrans scopeTrans) {
this.scopeTrans = scopeTrans;
this.transaction =scopeTrans.getTransaction();
this.transaction = scopeTrans.getTransaction();
}
@Override
public void commit() throws RollbackException {
scopeTrans.commitTransaction();
@@ -49,6 +48,11 @@ public class ScopedTransaction implements SpiTransaction {
scopeTrans.rollback(e);
}
@Override
public void rollbackIfActive() {
transaction.rollbackIfActive();
}
@Override
public void setRollbackOnly() {
scopeTrans.setRollbackOnly();