Merge pull request #250 from offlinehacker/embedsMany_deleted

Emit deleted event on delete for embedsMany relations
This commit is contained in:
Raymond Feng 2014-08-22 11:05:21 -07:00
commit ce12db3e45
1 changed files with 1 additions and 0 deletions

View File

@ -2107,6 +2107,7 @@ EmbedsMany.prototype.destroyById = function (fkId, cb) {
modelInstance.updateAttribute(propertyName,
embeddedList, function(err) {
cb(err);
modelTo.emit('deleted', inst.id, inst.toJSON());
});
}
} else if (typeof cb === 'function') {