data
data copied to clipboard
feat: implement legacy field, resource and collection decorators for supporting @ember-data/model migration
In order to enable a granular migration
-
fieldreplacesattrand moves serialize/deserialize logic to the new location -
resourcereplacesbelongsToand exposes a RelationshipDocument, no more async promises -
collectionreplaceshasManyand 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