I’m using backbone and bootstrapping some data according to practice (http://documentcloud.github.com/backbone/#FAQ-bootstrap).
However, now when I save any bootstrapped model, the Backbone treats the model as non-existent on the server (model.isNew === true, http://backbonejs.org/#Model-isNew) which in turn calls Backbone.sync with method ‘create’ instead of ‘update’. Thus, the POST instead of the PUT HTTP method is called.
how can I have bootstrapped models with isNew set to false, i.e. backbone treating them as existent on the server?
Apparently, model.isNew is determined by whether the id is set as explained here: http://backbonejs.org/#Model-isNew. That means bootstrapping data with the id set solves my problem