fix(product): Category repository missing ontext (#9688)

**What**
- Fix product category repository missing context passed to down level methods
- Ensure the base repository when getting the active manager returns a fresh one if possible instead of the global one in order to prevent shared entity map by mistake
This commit is contained in:
Adrien de Peretti
2024-10-21 11:42:17 +00:00
committed by GitHub
parent 63fff01f2f
commit 45df24f707
3 changed files with 35 additions and 37 deletions
@@ -54,7 +54,7 @@ export class MikroOrmBase<T = any> {
transactionManager,
manager,
}: Context = {}): TManager {
return (transactionManager ?? manager ?? this.manager_) as TManager
return (transactionManager ?? manager ?? this.getFreshManager()) as TManager
}
async transaction<TManager = unknown>(