Skip to content

Commit

Permalink
fix: register MongoMikroORM provider even if we fail to infer drive…
Browse files Browse the repository at this point in the history
…r from config and there is mongo installed

Closes #180
  • Loading branch information
B4nan committed May 21, 2024
1 parent 5fb8e48 commit 7e73205
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/mikro-orm-core.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ export class MikroOrmCoreModule implements OnApplicationShutdown {
...(options.providers || []),
...createAsyncProviders({ ...options, contextName: options.contextName }),
createMikroOrmProvider(contextName),
...(mongo ? [createMikroOrmProvider(contextName, mongo.MikroORM)] : []),
createEntityManagerProvider(options.scope, EntityManager, contextName),
...(em ? [createEntityManagerProvider(options?.scope, em.constructor as Type, contextName)] : []),
...(knex ? [createEntityManagerProvider(options?.scope, knex.EntityManager, contextName)] : []),
Expand Down

0 comments on commit 7e73205

Please sign in to comment.