Skip to content

ModelFragments needs to refactor its Fragment state machine for EmberData 3.28+ #416

@runspired

Description

@runspired

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 the isNew state.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions