API 参考
    正在准备搜索索引...

    类 AbstractRepository<Entity>

    Provides abstract class for custom repositories that do not inherit from original orm Repository. Contains all most-necessary methods to simplify code in the custom repository. All methods are protected thus not exposed and it allows to create encapsulated custom repository.

    use Repository.extend function to create a custom repository

    类型参数

    索引

    构造函数

    属性

    manager: EntityManager

    Gets entity manager that allows to perform repository operations with any entity.

    访问器

    • get repository(): Repository<Entity>

      Gets the original ORM repository for the entity that is managed by this repository. If current repository does not manage any entity, then exception will be thrown.

      返回 Repository<Entity>

    • get treeRepository(): TreeRepository<Entity>

      Gets the original ORM tree repository for the entity that is managed by this repository. If current repository does not manage any entity, then exception will be thrown.

      返回 TreeRepository<Entity>

    方法

    • Creates a new query builder for the repository's entity that can be used to build a SQL query. If current repository does not manage any entity, then exception will be thrown.

      参数

      • alias: string

      返回 SelectQueryBuilder<Entity>

    • Creates a new query builder for the given entity that can be used to build a SQL query.

      类型参数

      参数

      返回 SelectQueryBuilder<T>

    • Gets the original ORM repository for the given entity class.

      类型参数

      参数

      返回 Repository<T>

    • Gets the original ORM tree repository for the given entity class.

      类型参数

      参数

      返回 TreeRepository<T>