getModel Method
Get the Model with the specified identifier.
getModel<T extends Model>(modelId: string, modelClass?: EntityClassType<Model>): T
@throws IModelError if the model is not found, cannot be loaded, or fails validation when modelClass
is specified.
@see tryGetModel
Parameter | Type | Description |
---|---|---|
modelId | string | The Model identifier. |
modelClass | EntityClassType<Model> | Optional class to validate instance against. This parameter can accept abstract or concrete classes, but should be the same as the template (T ) parameter. |
Returns - T
Defined in
- core/backend/src/IModelDb.ts Line 1534
Last Updated: 14 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.