Remove record from Store without causing server call on DS.Store#commit

Asked By: Anonymous

I’m developing a push application and need to remove items from a DS.Store without invoking any actions. I’m able to insert objects using load(), but need to be able to “unload” an object after it has been deleted on another client.

Thanks


Solution

Answered By: Anonymous

Rather than remove a record from the store I just need to change the record state.

record.get('stateManager').goToState('deleted.saved');

For ember-data V ~1.0 use:

record.transitionTo('deleted.saved');

Windows 10 Kaufen Windows 10 Pro Office 2019 Kaufen Office 365 Lizenz Windows 10 Home Lizenz Office 2019 Home Business Kaufen windows office 365 satın al follower kaufen instagram follower kaufen porno