primaryKey{String}
The primaryKey
is used when serializing and deserializing data. Ember Data always uses the id
property to store the id of the record. The external source may not always follow this convention. In these cases it is useful to override the primaryKey
property to match the primaryKey
of your external store.
Example
app/serializers/application.js
import DS from 'ember-data'; export default DS.JSONSerializer.extend({ primaryKey: '_id' });
Default: 'id'
Please login to continue.