ebryn / ember-model

A lightweight model library for Ember.js
MIT License
524 stars 159 forks source link

hasMany not working for embedded records with fetch #408

Open jshy opened 10 years ago

jshy commented 10 years ago

I don't know if this is isolated to fetch or find also has the problem, but when fetching data, embedded record content is not loading correctly. The finally object has the _hasMany arrays, but no content. I tracked the problem to this

in Ember.Model.load() this._reloadHasManys(); and in _reloadHasManys(); the first line: if (!this._hasManyArrays) { return; } I placed a console.log() statement to see if this was getting hit and it was. I commented out the this._reloadHasManys(); line and everything works great now.