Delete records from the adapter #519

calexicoz opened this Issue Dec 12, 2012 · 3 comments


None yet

2 participants


Related to #68 and #200.

When the backend is able to push information to clients, we need a way to mark a record as deleted from the adapter.

It is already possible to load new records and update them via store.load(type, id, data), and we also have model.unloadRecord, but this requires having access to the model, which is not straightforward from the adapter without calling private methods on the store. I'd like to have store.unload(type, id) so that I can delete record directly from the adapter when I receive realtime updates from the server.

There might already be a simple way to do this that I'm not aware of.



I think you can call store.find(id).deleteRecord(), which I think is pretty straightforward. @calexicoz Do you agree ?


That should work. I can keep track of what's already been deleted in the adapter and simply not make a server call. I haven't worked on this for a while, so let's simply close it for now, and I'll reopen it if I run into troubles.


@calexicoz calexicoz closed this Apr 23, 2013

Thank you :). Keep in mind that store.find('id') will not hit the server if the record is already into the store. In combination with store.recordIsLoaded(id), you should be able to do you job in the adapter pretty easily :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment