-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Labels
Description
it seems a little weird that you have to specify which fields go up when you save a model and want to patch only what has changed
Currently this will send the entire model:
model.save(null, {patch: true});this will send the attributes that changed, but we have to manually specify the keys and values:
model.save({
fieldOne: 123,
fieldTwo: 123
}, {patch: true});which is just as bad as not even using the model
request.patch('/api/users/' + model._id)
.send({
fieldOne: 123,
fieldTwo: 123
});