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.
Extends
Section titled “Extends”Properties
Section titled “Properties”
readonlyem:EntityManager
Defined in: packages/ddd-mikro-orm/src/interfaces/entity-manager-source.ts:20
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”transactional()
Section titled “transactional()”transactional<
T>(work):Promise<T>
Defined in: packages/ddd-mikro-orm/src/cache/mikro-orm.cache.ts:38
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”(em) => Promise<T>
Returns
Section titled “Returns”Promise<T>