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 authored and GitHub committed 2024-10-21 11:42:17 +00:00
1 parent 63fff01f2f
commit 45df24f707
3 files changed
+35 -37

No files matched your search

@@ -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>(