I have an object that’s also saved in the server and I’m creating a Backbone model from that object.
But when I save the model, it’s doing a PUT request, which is not what I want. How to tell Backbone that the data is already in the server without doing a fetch?
Backbone determines the newness of a model by checking if an id is set :
And when you save a model,
Backbone Sync documentation
And as noted by @JayC in the comments :
If there’s an issue that the id can’t literally be
id, you can useidAttributeto say which is the “identity” or key field.