Hello everyone,
Since 6.2.0 mikro-orm supports mssql.
In our project (in some services) we use both mongo & mssql.
I'm trying to configure the project to work with both, but failing...
Decided to make a step back and have only mongo, but using named connection (AKA contextName) and as soon as I add it the project fails with the following error:
core/injector/injector.js:254
throw new unknown_dependencies_exception_1.UnknownDependenciesException(wrapper.name, dependencyContext, moduleRef, { id: wrapper.id });
^
Error: Nest can't resolve dependencies of the MikroOrmMiddleware (?). Please make sure that the argument MikroORM at index [0] is available in the MikroOrmCoreModule context.
Potential solutions:
- Is MikroOrmCoreModule a valid NestJS module?
- If MikroORM is a provider, is it part of the current MikroOrmCoreModule?
- If MikroORM is exported from a separate @Module, is that module imported within MikroOrmCoreModule?
@Module({
imports: [ /* the Module containing MikroORM */ ]
})
Has anyone ever tried to have 2 connections at the same time with mikro-orm?
Thanks in advance and feel free to ask for snippets of code if needed.