Search code examples
javascriptbackbone.js

Backbone.js partial model update


Is it possible to send just the modified properties of a model when saving the changes?

BTW, Are there any "official" Backbone.js group/mailing list to ask this kind of questions?


Solution

  • Currently backbone does not support sending part of the model to the server. It would be an interesting addition though.

    If you browse the source you can see that Backbone.sync (the part of backbone that is responsible for communicating with the data store) is one of the simplest components in backbone and simply wraps the ajax support in jQuery or Zepto.


    UPDATE

    starting backbone version 0.9.10, partial model update is supported natively via

    model.save(attrs, {patch: true})