load lazy models only when they have a session#78
load lazy models only when they have a session#78belluzj wants to merge 1 commit intogetoutreach:masterfrom
Conversation
|
Can you give an example where you hit this for context? |
|
If you are to clone this and launch it (on the Thanks in advance |
|
Thanks for this pull request, fixed a problem I was having when manually creating models from JSON with belongsTo relationships and merging them with |
|
I am going to put some more work into lazy models soon, but in the mean time I will merge this if I could get a failing test. |
|
I'm sorry, I'm not working on Ember-based applications anymore, I won't be able to write tests. But you already have a whole failing application at https://github.com/belluzj/epf_example/tree/broken-lazy. (it was broken at the time, I'm not sure it still is). |
This fix removed lots of errors from my console, and stabilized my app.
It seems that while EPF loads json with sideloaded models, at some point models don't have a session yet but are triggered to load because of observers. Without this fix it just breaks and the lazy model is never resolved. With it, the loading eventually takes place.