Skip to content

Commit 6fee872

Browse files
tsangsteB4nan
andauthored
Update README.md
Co-authored-by: Martin Adámek <[email protected]>
1 parent 7b70c3d commit 6fee872

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ More information about [enableShutdownHooks](https://docs.nestjs.com/fundamental
342342

343343
## Multiple Database Connections
344344

345-
You can define multiple database connections by registering several MikroOrmModules, each with a unique contextName and setting registerRequestContext to false. If you want to use the middleware request context you must register `MultipleMikroOrmModule` with `forRoot()` or use NestJS `Injection Scope`
345+
You can define multiple database connections by registering multiple `MikroOrmModule`s, each with a unique `contextName`. You will need to disable the automatic request context middleware by setting `registerRequestContext` to `false`, as it wouldn't work with this approach - note that this needs to be part of all your `MikroOrmModule`s with non-default `contextName`. To have the same automatic request context behaviour, you must register `MultiMikroOrmModule` with `forRoot()` instead:
346346

347347
```typescript
348348
@Module({

0 commit comments

Comments
 (0)