Home > @infiniteobjects/models > Repository > instanceFromModel
Creates and instance of from the given plain object (partial Model)
Signature:
instanceFromModel(data: PartialDeep<Model<EntityType>>): EntityType;
Parameter | Type | Description |
---|---|---|
data | PartialDeep<Model<EntityType>> | Model data |
Returns:
EntityType
Either an Entity or a Promise that will resolve in to an Entity if useDefaultData=true