DS.Model#destroyRecord()

destroyRecord (options) Promise Defined in addon/-private/system/model/model.js:532 Same as deleteRecord, but saves the record immediately. Example app/routes/model/delete.js import Ember from 'ember'; export default Ember.Route.extend({ actions: { delete: function() { var controller = this.controller; controller.get('model').destroyRecord().then(function() { controller.transitionToRoute('model.index'); }); } } }); If you pass an object on the adapter

DS.Model#currentState

currentState{Object}private Defined in addon/-private/system/model/model.js:303

DS.Model#changedAttributes()

changedAttributesObject Defined in addon/-private/system/model/model.js:605 Returns an object, whose keys are changed properties, and value is an [oldProp, newProp] array. The array represents the diff of the canonical state with the local state of the model. Note: if the model is created locally, the canonical state is empty since the adapter hasn't acknowledged the attributes yet: Example app/models/mascot.js import DS from 'ember-data'; export default DS.Model.extend({ name: attr('str

DS.Model#belongsTo()

belongsTo (name) BelongsToReference Defined in addon/-private/system/model/model.js:823 Available since 2.5.0 Get the reference for the specified belongsTo relationship. Example // models/blog.js export default DS.Model.extend({ user: DS.belongsTo({ async: true }) }); var blog = store.push({ type: 'blog', id: 1, relationships: { user: { type: 'user', id: 1 } } }); var userRef = blog.belongsTo('user'); // check if the user relationship is loaded var isLoaded = userRef.value()

DS.Model#data

data{Object}private Defined in addon/-private/system/model/model.js:947

DS.Model#becameInvalid event

becameInvalid Defined in addon/-private/system/model/model.js:458 Fired when the record becomes invalid.

DS.Model#adapterDidDirty()

adapterDidDirtyprivate Defined in addon/-private/system/model/model.js:655

DS.Model#becameError event

becameError Defined in addon/-private/system/model/model.js:465 Fired when the record enters the error state.

DS.Model#adapterError

adapterError{DS.AdapterError} Defined in addon/-private/system/model/model.js:373 This property holds the DS.AdapterError object with which last adapter operation was rejected.

DS.Model

DS.Model Class Extends: Ember.Object Uses: Ember.Evented Defined in: addon/-private/system/relationships/ext.js:96 Module: ember-data The model class that all Ember Data records descend from. This is the public API of Ember Data models. If you are using Ember Data in your application, this is the class you should use. If you are working on Ember Data internals, you most likely want to be dealing with InternalModel