From 0bcbe6ceaed09bb7784b2407227e62c99b354412 Mon Sep 17 00:00:00 2001 From: Raymond Feng Date: Fri, 9 May 2014 09:59:34 -0700 Subject: [PATCH] Remove undefined for the data to be saved --- lib/dao.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/dao.js b/lib/dao.js index 4cf85929..6f07907b 100644 --- a/lib/dao.js +++ b/lib/dao.js @@ -771,6 +771,7 @@ DataAccessObject.prototype.save = function (options, callback) { function save() { inst.trigger('save', function (saveDone) { inst.trigger('update', function (updateDone) { + data = removeUndefined(data); inst._adapter().save(modelName, inst.constructor._forDB(data), function (err) { if (err) { return callback(err, inst);