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.Model.typeForRelationship()

typeForRelationship (name, store) DS.Modelstatic Defined in addon/-private/system/relationships/ext.js:161 For a given relationship name, returns the model type of the relationship. For example, if you define a model like this: app/models/post.js import DS from 'ember-data'; export default DS.Model.extend({ comments: DS.hasMany('comment') }); Calling App.Post.typeForRelationship('comments') will return App.Comment. Parameters: name String the name of the relationship store Store

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.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.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.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.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.fields

fieldsEmber.Mapstatic Defined in addon/-private/system/relationships/ext.js:488 A map whose keys are the fields of the model and whose values are strings describing the kind of the field. A model's fields are the union of all of its attributes and relationships. For example: 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'), title: DS.attr('string') }); import Ember f