* @internal
(
readonly config: Configuration,
protected readonly driver: Driver,
protected readonly metadata: MetadataStorage,
useContext = true,
protected readonly eventManager: EventManager = new EventManager(config.get('subscribers')),
)
| 135 | * @internal |
| 136 | */ |
| 137 | constructor( |
| 138 | readonly config: Configuration, |
| 139 | protected readonly driver: Driver, |
| 140 | protected readonly metadata: MetadataStorage, |
| 141 | useContext = true, |
| 142 | protected readonly eventManager: EventManager = new EventManager(config.get('subscribers')), |
| 143 | ) { |
| 144 | this.#useContext = useContext; |
| 145 | this.#entityLoader = new EntityLoader(this); |
| 146 | this.name = this.config.get('contextName'); |
| 147 | this.#comparator = this.config.getComparator(this.metadata); |
| 148 | this.#resultCache = this.config.getResultCacheAdapter(); |
| 149 | this.#disableTransactions = this.config.get('disableTransactions'); |
| 150 | this.#entityFactory = new EntityFactory(this); |
| 151 | this.#unitOfWork = new UnitOfWork(this); |
| 152 | } |
| 153 | |
| 154 | /** |
| 155 | * Gets the Driver instance used by this EntityManager. |
nothing calls this directly
no test coverage detected