DS.Model#hasDirtyAttributes

hasDirtyAttributes{Boolean} Defined in addon/-private/system/model/model.js:101 Available since 1.13.0 If this property is true the record is in the dirty state. The record has local changes that have not yet been saved by the adapter. This includes records that have been created (but not yet saved) or deleted. Example var record = store.createRecord('model'); record.get('hasDirtyAttributes'); // true store.findRecord('model', 1).then(function(model) { model.get('hasDirtyAttributes'); //

DS.Model#errors

errors{DS.Errors} Defined in addon/-private/system/model/model.js:309 When the record is in the invalid state this object will contain any errors returned by the adapter. When present the errors hash contains keys corresponding to the invalid property names and values which are arrays of Javascript objects with two keys: message A string containing the error message from the backend attribute The name of the property associated with this error message record.get('errors.length'); // 0 rec

DS.Model#eachRelationship()

eachRelationship (callback, binding) Inherited from DS.Model but overwritten in addon/-private/system/relationships/ext.js:603 Given a callback, iterates over each of the relationships in the model, invoking the callback with the name of each relationship and its relationship descriptor. The callback method you provide should have the following signature (all parameters are optional): function(name, descriptor); name the name of the current property in the iteration descriptor the meta

DS.Model#dirtyType

dirtyType{String} Defined in addon/-private/system/model/model.js:222 If the record is in the dirty state this property will report what kind of change has caused it to move into the dirty state. Possible values are: created The record has been created by the client and not yet saved to the adapter. updated The record has been updated by the client and not yet saved to the adapter. deleted The record has been deleted by the client and not yet saved to the adapter. Example var record = st

DS.Model#didUpdate event

didUpdate Defined in addon/-private/system/model/model.js:437 Fired when the record is updated.

DS.Model#didLoad event

didLoad Defined in addon/-private/system/model/model.js:430 Fired when the record is loaded from the server.

DS.Model#didDelete event

didDelete Defined in addon/-private/system/model/model.js:451 Fired when the record is deleted.

DS.Model#didDefineProperty()

didDefineProperty (proto, key, value) Defined in addon/-private/system/relationships/ext.js:102 This Ember.js hook allows an object to be notified when a property is defined. In this case, we use it to be notified when an Ember Data user defines a belongs-to relationship. In that case, we need to set up observers for each one, allowing us to track relationship changes and automatically reflect changes in the inverse has-many array. This hook passes the class being set up, as well as the ke

DS.Model#didCreate event

didCreate Defined in addon/-private/system/model/model.js:444 Fired when a new record is commited to the server.

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