Page Contents
Home > @loopback/repository > CrudConnector > updateById
CrudConnector.updateById() method
Update an entity by id
Signature:
updateById?<IdType>(modelClass: Class<Entity>, id: IdType, data: EntityData, options?: Options): Promise<boolean>;
Parameters
Parameter | Type | Description |
---|---|---|
modelClass | Class<Entity> | The model class |
id | IdType | The entity id value |
data | EntityData | The data attributes to be updated |
options | Options | Options for the operation |
Returns:
Promise<boolean>
Promise