Skip to content
From 0.5.0 the packages continue as @cqrs-ddd, documented at aristoteliss.github.io/ddd-cqrs; NestJS applications add @cqrs-ddd/nestjs. This site documents the 0.4.x line.

ITransactionalEntityManagerSource

Defined in: packages/ddd-mikro-orm/src/cache/mikro-orm.cache.ts:36

An IEntityManagerSource that can also run work in a transaction.

transactional must run work on a manager dedicated to that call, never on the caller’s request or transaction manager, so the cache’s compare-and-set steps commit on their own and never join a surrounding unit of work. em.fork().transactional(work) satisfies it.

readonly em: EntityManager

Defined in: packages/ddd-mikro-orm/src/interfaces/entity-manager-source.ts:20

IEntityManagerSource.em

transactional<T>(work): Promise<T>

Defined in: packages/ddd-mikro-orm/src/cache/mikro-orm.cache.ts:38

T

(em) => Promise<T>

Promise<T>