DS.Model._create()

_createprivatestatic Defined in addon/-private/system/model/model.js:959 Alias DS.Model's create method to _create. This allows us to create DS.Model instances from within the store, but if end users accidentally call create() (instead of createRecord()), we can raise an error.

DS.NumberTransform

DS.NumberTransform Class Extends: DS.Transform Defined in: addon/-private/transforms/number.js:10 Module: ember-data The DS.NumberTransform class is used to serialize and deserialize numeric attributes on Ember Data record objects. This transform is used when number is passed as the type parameter to the DS.attr function. Usage app/models/score.js import DS from 'ember-data'; export default DS.Model.extend({ value: DS.attr('number'), player: DS.belongsTo('player'), date: DS.attr('da

DS.Model.transformedAttributes

transformedAttributes{Ember.Map}static Defined in addon/-private/system/model/attr.js:71 A map whose keys are the attributes of the model (properties described by DS.attr) and whose values are type of transformation applied to each attribute. This map does not include any attributes that do not have an transformation type. Example app/models/person.js import DS from 'ember-data'; export default DS.Model.extend({ firstName: attr(), lastName: attr('string'), birthday: attr('date') });

DS.Model.relationshipsByName

relationshipsByNameEmber.Mapstatic Defined in addon/-private/system/relationships/ext.js:450 A map whose keys are the relationships of a model and whose values are relationship descriptors. For example, given a model with this definition: app/models/blog.js import DS from 'ember-data'; export default DS.Model.extend({ users: DS.hasMany('user'), owner: DS.belongsTo('user'), posts: DS.hasMany('post') }); This property would contain the following: import Ember from 'ember'; import Blo

DS.Model.relationships

relationshipsEmber.Mapstatic Defined in addon/-private/system/relationships/ext.js:325 The model's relationships as a map, keyed on the type of the relationship. The value of each entry is an array containing a descriptor for each relationship with that type, describing the name of the relationship as well as the type. For example, given the following model definition: app/models/blog.js import DS from 'ember-data'; export default DS.Model.extend({ users: DS.hasMany('user'), owner: DS.

DS.Model.inverseFor()

inverseFor (name) Objectstatic Defined in addon/-private/system/relationships/ext.js:191 Find the relationship which is the inverse of the one asked for. For example, if you define models like this: app/models/post.js import DS from 'ember-data'; export default DS.Model.extend({ comments: DS.hasMany('message') }); app/models/message.js import DS from 'ember-data'; export default DS.Model.extend({ owner: DS.belongsTo('post') }); App.Post.inverseFor('comments') -> { type: App.Messa

DS.Model.modelName

modelNameStringstatic Defined in addon/-private/system/model/model.js:985 Represents the model's class name as a string. This can be used to look up the model through DS.Store's modelFor method. modelName is generated for you by Ember Data. It will be a lowercased, dasherized string. For example: store.modelFor('post').modelName; // 'post' store.modelFor('blog-post').modelName; // 'blog-post' The most common place you'll want to access modelName is in your serializer's payloadKeyFromModelN

DS.Model.relatedTypes

relatedTypesEmber.Arraystatic Defined in addon/-private/system/relationships/ext.js:415 An array of types directly related to a model. Each type will be included once, regardless of the number of relationships it has with the model. For example, given a model with this definition: app/models/blog.js import DS from 'ember-data'; export default DS.Model.extend({ users: DS.hasMany('user'), owner: DS.belongsTo('user'), posts: DS.hasMany('post') }); This property would contain the follo

DS.Model.relationshipNames

relationshipNamesObjectstatic Defined in addon/-private/system/relationships/ext.js:366 A hash containing lists of the model's relationships, grouped by the relationship kind. For example, given a model with this definition: app/models/blog.js import DS from 'ember-data'; export default DS.Model.extend({ users: DS.hasMany('user'), owner: DS.belongsTo('user'), posts: DS.hasMany('post') }); This property would contain the following: import Ember from 'ember'; import Blog from 'app/mo

DS.Model.eachRelatedType()

eachRelatedType (callback, binding) static Defined in addon/-private/system/relationships/ext.js:559 Given a callback, iterates over each of the types related to a model, invoking the callback with the related type's class. Each type will be returned just once, regardless of how many different relationships it has with a model. Parameters: callback Function the callback to invoke binding Any the value to which the callback's `this` should be bound