vendredi 5 juin 2015

Ember Data TypeForRoot no longer being called

We are currently on Ember Data 1.0.0-beta.18, Ember 1.12 and CLI 0.2.7.

Since this last update, we are getting ember data assertion warnings like the following:

[Warning] WARNING: Encountered "open_requests" in payload, but no model was found for model name "open-request" (resolved model name using vault@serializer:appuser:.typeForRoot("open_requests")) (vendor.js, line 15423)

I also noticed that a console log we included in the appuser serializer is no longer called:

export default DS.RESTSerializer.extend( {
    typeForRoot: function(root) {
        console.log('appuser serializer called', root);
        if (root === 'open_requests') return this._super('openrequest');
        return this._super(root);
    },
});

I can confirm that TypeForRoot was called prior to this update. We have had a number of other issues since upgrading and it seems that they could all be related in some way to the serializers, so the questions are why are we getting these warnings and why is typeForRoot no longer being called?




Aucun commentaire:

Enregistrer un commentaire