samedi 3 octobre 2015

How change primaryKey in ember-data

i want use the primaryKey as _id, and not id, and i already try everything, but this error keeps poping up in the console:

You must include an 'id' for event in an object passed to 'push'

I already search a lot and i can't figure it out whats the problem, i am using the RESTSerializer to fix the problem:

'use strict'
SiteApp.ApplicationSerializer = DS.RESTSerializer.extend({
  primaryKey: '_id'
});

What could be the problem here??

Aucun commentaire:

Enregistrer un commentaire