PaulUithol/Backbone-relational — Issue #69: fetchRelated should not DESTROY models on error!
Author: edwardmsmith
Created: 2012-01-29 14:23:27+00:00
State: open

In fetchRelated, if there is an error fetching the models, bb-rel calls destroy() on the model:

https://github.com/PaulUithol/Backbone-relational/blob/master/backbone-relational.js#L998
https://github.com/PaulUithol/Backbone-relational/blob/master/backbone-relational.js#L1015

I don't think that it should call a destroy, as destroy then issues a DELETE request back to the server.

If there is some sort of error on the fetch, but it should have worked, then you may end up deleting the model on the server unintentionally if the DELETE subsequently works!