rekord
rekord copied to clipboard
Polymorphic hasRelation/hasRelations
The model is given an object/collection of objects from a remote source. Typically the parent model has the discriminator to know how to parse the input into a model. However sometimes you are given an object/collection that has its own ID and own type.
Person { contacts: [ { id: 1, type: 'phone' }, { id: 2, type: 'email ' } ] }