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.
ストアからレコードを削除するのではなく、レコードの状態を変更するだけです。
record.get('stateManager').goToState('deleted.saved');
ember-data V〜1.0の場合、以下を使用します。
record.transitionTo('deleted.saved');