Options
All
  • Public
  • Public/Protected
  • All
Menu

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.

experimental

Type parameters

Hierarchy

  • AbstractRepository

Index

Properties

Protected manager

manager: EntityManager

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

Accessors

Protected repository

  • 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.

    Returns Repository<Entity>

Protected treeRepository

  • 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.

    Returns TreeRepository<Entity>

Methods

Protected createQueryBuilder

  • 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.

    Parameters

    • alias: string

    Returns SelectQueryBuilder<Entity>

Protected createQueryBuilderFor

Private getCustomRepositoryTarget

  • getCustomRepositoryTarget(customRepository: any): Function | string | undefined
  • Gets custom repository's managed entity. If given custom repository does not manage any entity then undefined will be returned.

    Parameters

    • customRepository: any

    Returns Function | string | undefined

Protected getRepositoryFor

Protected getTreeRepositoryFor

Generated using TypeDoc