-
-
Notifications
You must be signed in to change notification settings - Fork 114
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
ModelFragments needs to refactor its Fragment state machine for EmberData 3.28+ #416
Comments
I do have a lot of issue linked to the state on |
I actually get those errors:
I have all those errors only in my test so far 🤔 . |
Okey I digged a little bit further. I updated on my side the
|
I did a little PR to fix my issue: #428 |
@runspired does @VincentMolinie fix go far enough to address this issue, i.e. will ModelFragments work on 3.28.x/4.x going forward? |
Should this issue be closed @runspired 🤔 ? |
I believe so |
currentState
on DS.Model is now derived heuristically, so setting it to our own state machine will no longer affect any of the state flags on Fragments that we are inheriting from DS.Model. Given that state transitions in ember-data aren't guaranteed and will likely be removed in 4.0 codepaths, we should rewrite our state machine to similarly derive the state.Potentially we can simply stop adding our own state machine entirely and instead rely on our RecordData implementation to feed the correct info to EmberData's heuristics.
The practical effects of this include for instance a new fragment (e.g.
store.createFragment('name')
) being in the loaded-but-dirty instead of theisNew
state.The text was updated successfully, but these errors were encountered: