samedi 16 janvier 2016

EmberJS Data DS.JSONSerializer vs. DS.JSONAPISerializer

I have a EmberJS project with two Model, they both seams to use different serializers. By debugging inside EmberJS Data i've seen that for the first Model the class of Serializer is "DS.JSONAPISerializer" and for the other "DS.JSONSerializer". I would like they both use the same.

I didn't override any serializers and their respective adapters are empty and extend the same adapter (GeneralAdapter).

The only difference is that ModelA objects are pushed to Ember from the server using a request and the adapter (using the same adapter as ModelB) whereas ModelB is only pushing from store.pushPayload from a controller (without using the adapter).

Is it a feature or a bug or I totally miss understanding something?




Aucun commentaire:

Enregistrer un commentaire