Page Contents

Home > @loopback/repository > EntityCrudRepository > exists

EntityCrudRepository.exists() method

Check if an entity exists for the given id

Signature:

exists(id: ID, options?: Options): Promise<boolean>;

Parameters

Parameter Type Description
id ID Value for the entity id
options Options Options for the operations

Returns:

Promise<boolean>

Promise if an entity exists for the id, otherwise Promise