Created
May 20, 2016 22:38
-
-
Save pjlamb12/0d2738f11759d92415146dc2849bab97 to your computer and use it in GitHub Desktop.
Sails.js Waterline Update Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function update(args, done) { | |
Model.update([{id: args.id}, {id2: args.id2}], [{field1: args.field1}, {field2: args.field2}]).exec(function(err, updatedModel) { | |
console.log('error on update: ', err); | |
console.log('updated model: ', updatedModel); | |
return updatedModel; | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
you cannot use [] square brackets to update. Thank You.