IEntityManagerSource
Defined in: packages/ddd-mikro-orm/src/interfaces/entity-manager-source.ts:19
Supplies the MikroORM EntityManager for the current operation.
AggregateRepository and MikroOrmCache read em on every
operation and never keep it, so a source may return a different manager each
time: the current tenant’s in a multi-tenant application, or the current
request’s. A getter over the application’s own store satisfies it, and so
does a plain { em } object in a single-database setup or a test.
Example
Section titled “Example”const source: IEntityManagerSource = { em: orm.em.fork() };Extended by
Section titled “Extended by”Properties
Section titled “Properties”
readonlyem:EntityManager
Defined in: packages/ddd-mikro-orm/src/interfaces/entity-manager-source.ts:20