Replace a Backbone Collection with Server Data Using fetch({ reset: true })
Use fetch({ reset: true }) and a parse hook to replace a Backbone collection's contents with a full server response.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Use fetch({ reset: true }) and a parse hook to replace a Backbone collection's contents with a full server response.
Symptom A Backbone.Collection backed by a REST endpoint continues to hold models that no longer exist on the server after a fetch() call. The default merge semantics reconcile incoming records by ID but never remove local models that are absent from the response. Context The application relies on Collection.fetch() to refresh data after server-side schema mi