diff --git a/lib/dao.js b/lib/dao.js index 26bec26c..ce3cad70 100644 --- a/lib/dao.js +++ b/lib/dao.js @@ -1587,7 +1587,7 @@ DataAccessObject.prototype.save = function (options, cb) { inst.trigger('save', function (saveDone) { inst.trigger('update', function (updateDone) { data = removeUndefined(data); - inst._adapter().save(modelName, inst.constructor._forDB(data), function (err, data, result) { + inst._adapter().save(modelName, inst.constructor._forDB(data), function (err, unusedData, result) { if (err) { return cb(err, inst); } diff --git a/test/manipulation.test.js b/test/manipulation.test.js index b0c9165e..f4486b61 100644 --- a/test/manipulation.test.js +++ b/test/manipulation.test.js @@ -340,6 +340,7 @@ describe('manipulation', function () { p.name = 'Hans'; p.save(function (err) { should.not.exist(err); + p.name.should.equal('Hans'); Person.findOne(function (err, p) { should.not.exist(err); p.name.should.equal('Hans');