fix(medusa): Add module config to transaction base service (#3033)

This commit is contained in:
Oliver Windall Juhl
2023-01-15 19:37:11 +01:00
committed by GitHub
parent 93d0dc1bdc
commit 1547dd8143
4 changed files with 41 additions and 30 deletions
@@ -7,7 +7,8 @@ export abstract class TransactionBaseService {
protected constructor(
protected readonly __container__: any,
protected readonly __configModule__?: Record<string, unknown>
protected readonly __configModule__?: Record<string, unknown>,
protected readonly __moduleDeclaration__?: Record<string, unknown>
) {}
withTransaction(transactionManager?: EntityManager): this {
@@ -17,7 +18,8 @@ export abstract class TransactionBaseService {
const cloned = new (this.constructor as any)(
this.__container__,
this.__configModule__
this.__configModule__,
this.__moduleDeclaration__
)
cloned.manager_ = transactionManager