Skip to content

feat: implement legacy field, resource and collection decorators for supporting @ember-data/model migration #8887

@runspired

Description

@runspired

In order to enable a granular migration

  • field replaces attr and moves serialize/deserialize logic to the new location
  • resource replaces belongsTo and exposes a RelationshipDocument, no more async promises
  • collection replaces hasMany and exposes a RelationshipDocument, no more async promises

Constraints will be

  • these decorators do not work with classic ember syntax (e.g. Model.extend({ name: attr() }))
  • therefore these decorators do not work in mixins
  • probably some more things as we figure out how to interop with computed correctly

Implementation will be achieved by

  • the decorators will at install time pad additional information somewhere we can retrieve it. Existing schema extraction paths will be updated to pull from this information.
  • we will have to figure out how to make this work without instantiating a record class first

Metadata

Metadata

Assignees

No one assigned

    Labels

    🏷️ featThis PR introduces a new featurev4-to-v5Tickets related to v4 to v5 migration paths

    Projects

    Status

    needs champion

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions