rekord icon indicating copy to clipboard operation
rekord copied to clipboard

Polymorphic hasRelation/hasRelations

Open ClickerMonkey opened this issue 4 years ago • 0 comments

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 ' } ] }

ClickerMonkey avatar May 01 '20 15:05 ClickerMonkey