From a04c13afef58d8d0a448c6005342f508d7c8f018 Mon Sep 17 00:00:00 2001 From: Ritchie Martori Date: Fri, 9 May 2014 17:18:28 -0700 Subject: [PATCH] Add missing changed event --- lib/dao.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/dao.js b/lib/dao.js index 6f00dc3b..10e0f642 100644 --- a/lib/dao.js +++ b/lib/dao.js @@ -229,6 +229,9 @@ DataAccessObject.upsert = DataAccessObject.updateOrCreate = function upsert(data obj = null; } callback(err, obj); + if(!err) { + Model.emit('changed', inst); + } }); } else { this.findById(getIdValue(this, data), function (err, inst) {