Answer the question
In order to leave comments, you need to log in
Why does backbone send all model attributes when save(attr, {patch: true})?
// внутри конструктора модели
initialize : function() {
this.on('change', function() {
console.warn(this.changed);
this.save(this.changed, {patch: true})
});
},
this.changed
one pair is issued {атрибут : "значение"}
, which I want to update for a specific model. update/patch
request and rejoice, you say. But the intranet system has the property of a large number of peak loads, where every byte counts. And the server is too weak, so you need to minify the amount of transferred data as soon as possible + clients can sit on dialup and such a request is also critical for them.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question