[deprecations] Use Store#unloadRecord instaed of Store#dematerializeRecord
This commit is contained in:
parent
a920ae9cd7
commit
e7ca2c8bfe
|
@ -11,7 +11,7 @@ export default Ember.Component.extend({
|
|||
var model = this.get('store').recordForId('ssh_key', id);
|
||||
|
||||
if (model) {
|
||||
this.get('store').dematerializeRecord(model._internalModel);
|
||||
this.get('store').unloadRecord(model);
|
||||
var typeMap = this.get('store').typeMapFor(model.constructor);
|
||||
var idToRecord = typeMap.idToRecord;
|
||||
delete idToRecord[id];
|
||||
|
|
|
@ -12,6 +12,7 @@ window.deprecationWorkflow.config = {
|
|||
{ handler: "log", matchMessage: "Usage of `state` is deprecated, use `_state` instead." },
|
||||
{ handler: "log", matchMessage: "RestAdapter#find has been deprecated and renamed to `findRecord`." },
|
||||
{ handler: "log", matchMessage: "Usage of `typeKey` has been deprecated and will be removed in Ember Data 2.0. It has been replaced by `modelName` on the model class." },
|
||||
{ handler: "log", matchMessage: "Using store.dematerializeRecord() has been deprecated since it was intended for private use only. You should use store.unloadRecord() instead." },
|
||||
|
||||
// TODO
|
||||
{ handler: "silence", matchMessage: "Ember.View is deprecated. Consult the Deprecations Guide for a migration strategy." },
|
||||
|
@ -22,7 +23,6 @@ window.deprecationWorkflow.config = {
|
|||
{ handler: "silence", matchMessage: "Ember.removeBeforeObserver is deprecated and will be removed in the near future." },
|
||||
{ handler: "silence", matchMessage: "The default behavior of `shouldBackgroundReloadRecord` will change in Ember Data 2.0 to always return true. If you would like to preserve the current behavior please override `shouldBackgroundReloadRecord` in your adapter:application and return false." },
|
||||
{ handler: "silence", matchMessage: "Using the same function as getter and setter is deprecated." },
|
||||
{ handler: "silence", matchMessage: "Using store.dematerializeRecord() has been deprecated since it was intended for private use only. You should use store.unloadRecord() instead." },
|
||||
{ handler: "silence", matchMessage: "Using DS.Snapshot.get() is deprecated. Use .attr(), .belongsTo() or .hasMany() instead." },
|
||||
]
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user