Page Contents
Home > @loopback/repository > EntityCrudRepository
EntityCrudRepository interface
CRUD operations for a repository of entities
Signature:
export interface EntityCrudRepository<T extends Entity, ID, Relations extends object = {}> extends EntityRepository<T, ID>, CrudRepository<T, Relations>
Extends: EntityRepository<T, ID>, CrudRepository<T, Relations>
Properties
Property | Type | Description |
---|---|---|
entityClass | typeof Entity & { prototype: T; } | |
inclusionResolvers | Map<string, InclusionResolver<T, Entity>> |
Methods
Method | Description |
---|---|
delete(entity, options) | Delete an entity |
deleteById(id, options) | Delete an entity by id |
exists(id, options) | Check if an entity exists for the given id |
findById(id, filter, options) | Find an entity by id, return a rejected promise if not found. |
replaceById(id, data, options) | Replace an entity by id |
save(entity, options) | Save an entity. If no id is present, create a new entity |
update(entity, options) | Update an entity |
updateById(id, data, options) | Update an entity by id with property/value pairs in the data object |