var actions = this.inherited(arguments); // do the default save and then update for version numbers var prefix = this.service.servicePath; for(var i = 0; i < actions.length; i++){ // need to update the item's version number after it has been committed (function(item,dfd){ dfd.addCallback(function(result){ if(result){ item.__id = prefix + result.id; // update the object with the results of the post item._rev = result.rev; } return result; }); })(actions[i].content,actions[i].deferred); }