jeromegn / Backbone.localStorage

A localStorage adapter for Backbone.js
MIT License
1.89k stars 681 forks source link

Model ID change (update) must remove old ID instance from localStorage #198

Closed recallfx closed 7 years ago

recallfx commented 8 years ago

Updating model ID currently creates new instance with new ID and leaves the old one unchanged. This fix destroys old instance.

scott-w commented 7 years ago

I'm not convinced this is the best way forward. I think it should be incumbent on the developer to do this themselves.

My reasoning for this stems from the idea that I wouldn't expect changing the ID to delete my model on the server without a load of manual work on the side of the developer.

Thanks for the contribution, however.