不要怂,就是干,撸起袖子干!

Commit 7639a45a by sdepold

Merge branch 'm1.3.7' of https://github.com/nazar/sequelize into nazar-m1.3.7

2 parents cd57fd14 74f2c95d
Showing with 5 additions and 2 deletions
......@@ -165,6 +165,11 @@ module.exports = (function() {
DAO.prototype.updateAttributes = function(updates) {
this.setAttributes(updates)
return this.save()
}
DAO.prototype.setAttributes = function(updates) {
var self = this
var readOnlyAttributes = Utils._.keys(this.__factory.primaryKeys)
......@@ -181,8 +186,6 @@ module.exports = (function() {
)
updateAllowed && (self[attr] = value)
})
return this.save()
}
DAO.prototype.destroy = function() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!