Class DS.Model

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

errors

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:

hasDirtyAttributes

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.

id

All ember models have an id property. This is an identifier
managed by an external source. These are always coerced to be
strings before being used internally. Note when declaring the
attributes for a model it is an error to declare an id
attribute.

isDeleted

If this property is true the record is in the deleted state
and has been marked for deletion. When isDeleted is true and
hasDirtyAttributes is true, the record is deleted locally but the deletion
was not yet persisted. When isSaving is true, the change is
in-flight. When both hasDirtyAttributes and isSaving are false, the
change has persisted.

isEmpty

If this property is true the record is in the empty
state. Empty is the first state all records enter after they have
been created. Most records created by the store will quickly
transition to the loading state if data needs to be fetched from
the server or the created state if the record is created on the
client. A record can also enter the empty state if the adapter is
unable to locate the record.

isLoading

If this property is true the record is in the loading state. A
record enters this state when the store asks the adapter for its
data. It remains in this state until the adapter provides the
requested data.

isSaving

If this property is true the record is in the saving state. A
record enters the saving state when save is called, but the
adapter has not yet acknowledged that the changes have been
persisted to the backend.

The most common place you'll want to access modelName is in your serializer's payloadKeyFromModelName method. For example, to change payload
keys to underscore (instead of dasherized), you might use the following code:

relationships

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.

transformedAttributes

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.