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
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
record.unloadRecord();
This clears belongsTo
and hasMany
relationships on the record and then transitions the record to the deleted.saved
state, all without sending anything to the server.
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');