[Entanglement] Link service returns object in new context

The link service return the object in the new context.
This commit is contained in:
Pete Richards
2015-08-06 14:55:50 -07:00
parent 4c56e4ffdc
commit 4a755e259f
3 changed files with 26 additions and 20 deletions

View File

@@ -66,6 +66,17 @@ define(
}
}).then(function () {
return parentObject.getCapability('persistence').persist();
}).then(function getObjectWithNewContext() {
return parentObject
.useCapability('composition')
.then(function (children) {
var i;
for (i = 0; i < children.length; i += 1) {
if (children[i].getId() === object.getId()) {
return children[i];
}
}
});
});
}
};