Skip to content

Commit 7e73205

Browse files
committed
fix: register MongoMikroORM provider even if we fail to infer driver from config and there is mongo installed
Closes #180
1 parent 5fb8e48 commit 7e73205

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/mikro-orm-core.module.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ export class MikroOrmCoreModule implements OnApplicationShutdown {
127127
...(options.providers || []),
128128
...createAsyncProviders({ ...options, contextName: options.contextName }),
129129
createMikroOrmProvider(contextName),
130+
...(mongo ? [createMikroOrmProvider(contextName, mongo.MikroORM)] : []),
130131
createEntityManagerProvider(options.scope, EntityManager, contextName),
131132
...(em ? [createEntityManagerProvider(options?.scope, em.constructor as Type, contextName)] : []),
132133
...(knex ? [createEntityManagerProvider(options?.scope, knex.EntityManager, contextName)] : []),

0 commit comments

Comments
 (0)