Resolved merge conflicts

This commit is contained in:
Henry
2016-05-12 16:03:19 -07:00
parent e5ef7c0c22
commit bd686790dc
11 changed files with 53 additions and 91 deletions

View File

@@ -32,7 +32,7 @@ define(
};
DirtyModelCache.prototype.isDirty = function (domainObject) {
return !!this.get(domainObject.getId());
return !!this.cache[domainObject.getId()];
};
DirtyModelCache.prototype.markDirty = function (domainObject) {

View File

@@ -39,9 +39,8 @@ define(
}
TransactionService.prototype.startTransaction = function () {
if (this.transaction) {
throw "Transaction in progress";
}
if (this.transaction)
console.error("Transaction already in progress")
this.transaction = true;
};
@@ -68,7 +67,7 @@ define(
}
return this.$q.all(
Object.keys(this.cache)
Object.keys(cache)
.map(keyToObject)
.map(objectToPromise))
.then(function () {
@@ -93,7 +92,7 @@ define(
}
function objectToPromise(object) {
return object.getCapability('persistence').refresh();
return self.$q.when(object.getModel().persisted && object.getCapability('persistence').refresh());
}
return this.$q.all(Object.keys(cache)