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

Commit da7ebe61 by Pasvaz

Allows updateAttributes to update only some fields

IT's the same logic as for save(), you can update the whole record or pick the fields you want to update.
1 parent 9fbe5615
Showing with 2 additions and 2 deletions
......@@ -201,9 +201,9 @@ module.exports = (function() {
}
DAO.prototype.updateAttributes = function(updates) {
DAO.prototype.updateAttributes = function(updates, fields) {
this.setAttributes(updates)
return this.save()
return this.save(fields)
}
DAO.prototype.setAttributes = function(updates) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!