DS.Model#deleteRecord()

deleteRecord Defined in addon/-private/system/model/model.js:500 Marks the record as deleted but does not save it. You must call save afterwards if you want to persist it. You might use this method if you want to allow the user to still rollbackAttributes() after a delete it was made. Example app/routes/model/delete.js import Ember from 'ember'; export default Ember.Route.extend({ actions: { softDelete: function() { this.controller.get('model').deleteRecord(); }, confirm

DS.Model#data

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

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#becameInvalid event

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

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#adapterDidDirty()

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

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