-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A bidirectional relationship parent.children
becomes hasLoaded: true
when a child that references the parent is pushed to the store
#5211
Comments
This happens not only after a push. You can |
This one seems to be either related or duplicate: #5209. |
Here's another Twiddle demonstrating this issue. In our use-case, we are fetching some data in the route's model hook, and then side loading the rest. This pattern has worked at least up until |
#5209 isn't the same issue - it only happens when inverse on one end is null (and I just fixed it with a PR) |
I have a failing test for this one - I'll try and fix tomorrow. |
Fixed in PR #5257 |
I believe this has been resolved by #5230. Feel free to reopen if it is still an issue. |
Affected versions
Ember Data 2.14+. This includes current stable Ember Data 2.16.1.
Steps to reproduce
Given two models:
Push two records into the store:
Expected behavior (Ember Data 2.13 and below work correctly)
The
parent.children
relationship is not considered loaded:When you do
parent.get('children')
, a network request is made.Actual behavior (Ember Data 2.14 and above)
The
parent.children
relationship is considered loaded:When you do
parent.get('children')
, a network request is not made, which breaks our app in many ways.Reproduction
https://ember-twiddle.com/3331c5dfc361920818fa3325842f5b3e?openFiles=controllers.application.js%2C (see console output, then try switching to
2.12.0
intwiddle.json
)Credit
This bug has been discovered by @vvainio.
The text was updated successfully, but these errors were encountered: