Emit deleted event on delete for embedsMany relations

Signed-off-by: Jaka Hudoklin <jakahudoklin@gmail.com>
This commit is contained in:
Jaka Hudoklin 2014-08-22 16:02:01 +02:00
parent fb91c5463e
commit 000c380a48
1 changed files with 1 additions and 0 deletions

View File

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