Add missing changed event

This commit is contained in:
Ritchie Martori 2014-05-09 17:18:28 -07:00
parent cbf99d57a9
commit a04c13afef
1 changed files with 3 additions and 0 deletions

View File

@ -229,6 +229,9 @@ DataAccessObject.upsert = DataAccessObject.updateOrCreate = function upsert(data
obj = null; obj = null;
} }
callback(err, obj); callback(err, obj);
if(!err) {
Model.emit('changed', inst);
}
}); });
} else { } else {
this.findById(getIdValue(this, data), function (err, inst) { this.findById(getIdValue(this, data), function (err, inst) {