Class Snapshot

public

Snapshot is not directly instantiable. Instances are provided to a consuming application's adapters and serializers for certain requests.

Snapshots are only available when using @ember-data/legacy-compat for legacy compatibility with adapters and serializers.

Show:

A hash of adapter options

The id of the snapshot's underlying record

Example

1
2
// store.push('post', { id: 1, author: 'Tomster', title: 'Ember.js rocks' });
postSnapshot.id; // => '1'

The unique RecordIdentifier associated with this Snapshot.

If include was passed to the options hash for the request, the value would be available here.

The name of the type of the underlying record for this snapshot, as a string.

The underlying record for this snapshot. Can be used to access methods and properties defined on the record.

Example

1
let json = snapshot.record.toJSON();