[Persistence] Use NestedTransaction

This commit is contained in:
Victor Woeltjen 2016-07-26 15:20:40 -07:00
parent 0fe0b21eda
commit 6f2c80bc2e

View File

@ -21,8 +21,8 @@
*****************************************************************************/
/*global define*/
define(
['./Transaction'],
function (Transaction) {
['./Transaction', './NestedTransaction'],
function (Transaction, NestedTransaction) {
/**
* Implements an application-wide transaction state. Once a
* transaction is started, calls to
@ -50,8 +50,10 @@ define(
TransactionService.prototype.startTransaction = function () {
if (this.transaction) {
this.transactionStack.push(this.transaction);
this.transaction = new NestedTransaction(this.transaction);
} else {
this.transaction = new Transaction(this.$log);
}
this.transaction = new Transaction(this.$log);
};
/**