ember-data
Advanced tools
Changelog
Release 1.0.0-beta.19.2 (June 12, 2015)
app/store.js
- https://github.com/emberjs/data/pull/3316currentState
was not defined on a record
until the record a state change occured. https://github.com/emberjs/data/pull/3311Changelog
Release 1.0.0-beta.19.1 (June 9, 2015)
DS.Model
's InternalModel
would not be set
on init - @bmac https://github.com/emberjs/data/pull/3262Changelog
Release 1.0.0-beta.19 (June 5, 2015)
In order to fix deprecations warning induced by Ember 1.12, the store service is now injected as an instanceInitializer. As a consequence, if you had initializers depending on the store, you should move them to an instance initializer as well, and mark it as after: 'ember-data'.
store.find(App.Post, '1')
. Use the string form instead:
post
instead of App.Post
. You can also use this Ember Watson
commandChangelog
Release 1.0.0-beta.18 (May 18, 2015)
RESTSerializer#typeForRoot
has been deprecated. You can use
RESTSerializeer#modelNameFromPayloadKey
instead.RESTSerializer#payloadKeyFromModelName
. This allows you totypeKey
on Snapshots and Model classes has been deprecated. Use
modelName
instead.
specify the outgoing root key for a JSON payload.Changelog
Release 1.0.0-beta.17 (May 10, 2015)
/
if namespace is absolute. @rwjbluetype
inconsistently @emberjsfind
stayed in loading state @pangratzrolledBack
event @lolmausattrs
from superclasses into their subclasses. @omghaxChangelog
Release 1.0.0-beta.16.1 (March 24, 2015)
Changelog
Release 1.0.0-beta.16 (March 23, 2015)
In 1.0.0-beta.15 serializers were updated to be passed snapshots instead of records to prevent side-effects like fetching data when inspecting relationships. This has now been extended to also include adapters methods.
The following adapter methods are now passed snapshots instead of records:
find(store, type, id, snapshot)
findMany(store, type, ids, snapshots)
findHasMany(store, snapshot, url, relationship)
findBelongsTo(store, snapshot, url, relationship)
createRecord(store, type, snapshot)
updateRecord(store, type, snapshot)
deleteRecord(store, type, snapshot)
The signature of buildURL(type, id, snapshot)
has also been updated to receive
snapshots instead of records.
This change removes the need for adapters to create snapshots manually using the
private API record._createSnapshot()
to be able to pass snapshots to
serializers.
Snapshots are backwards-compatible with records (with deprecation warnings) and it should be pretty straight forward to update current code to the public Snapshot API:
post.id => postSnapshot.id
post.title => postSnapshot.attr('title')
post.author => postSnapshot.belongsTo('author')
post.comments => postSnapshot.hasMany('comments')
post.constructor => postSnapshot.type;
post.constructor.typeKey => postSnapshot.typeKey
If you need to access the underlying record of a snapshot you can do so by
accessing snapshot.record
.
The full API reference of DS.Snapshot
can be found here.
Ember.required
(it is deprecated).store
in serializerstore
property on DS.Modelstore
property on DS.Model subclassesChangelog
Release 1.0.0-beta.15 (February 14, 2015)
Changelog
Ember Data 1.0.0-beta.14.1 (December 31, 2014)
<%= versionStamp %>
with actual version stamp. Thanks
@tricknotes!