We are using ember 1.13.5
, ember-data 1.13.7
and sails 0.11
for the backend.
The full error is: Cannot read property 'modelName' of undefined at ember$data$lib$system$store$$Service.extend.serializerFor
I followed the code through dev-tools and came to the code shown in the image below. It shows that modelName
is defined.
This is the actually code that is being called in my setup.js
controller:
_this.store.query('business-account', {user: user.get('id')})
.then(function(businessAccount) {
debugger;
}, function(err) {
debugger;
});
The above throws the following error:
TypeError: Cannot read property 'modelName' of undefined
at ember$data$lib$system$store$$Service.extend.serializerFor (http://ift.tt/1haAyVr)
at http://ift.tt/1haAvZC
at http://ift.tt/1OF57x1
at Map.forEach.cb (http://ift.tt/1OF55Fl)
at OrderedSet.forEach (http://ift.tt/1OF55Fn)
at Map.forEach (http://ift.tt/1haAyVu)
at Function.ember$data$lib$system$model$$default.reopenClass.eachRelationship (http://ift.tt/1OF55Fp)
at DS.default.RESTSerializer.extend._extractEmbeddedRecords (http://ift.tt/1haAyVy)
at DS.default.RESTSerializer.extend.normalize (http://ift.tt/1OF55Fr)
at apply (http://ift.tt/1haAvZL)
Aucun commentaire:
Enregistrer un commentaire