@mikro-orm/nestjs 7.0.0-dev.1 → 7.0.0-dev.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -105,15 +105,15 @@ let MikroOrmCoreModule = MikroOrmCoreModule_1 = class MikroOrmCoreModule {
105
105
  }
106
106
  try {
107
107
  let config;
108
- if ('useFactory' in options) {
108
+ if (typeof options === 'object' && options && 'driver' in options) {
109
+ config = new Configuration(options, false);
110
+ }
111
+ if (!config && 'useFactory' in options) {
109
112
  config = new Configuration(await options.useFactory(), false);
110
113
  }
111
114
  if (!config && options instanceof Configuration) {
112
115
  config = options;
113
116
  }
114
- if (!config && typeof options === 'object' && options && 'driver' in options) {
115
- config = new Configuration(options, false);
116
- }
117
117
  return config?.getDriver().createEntityManager();
118
118
  }
119
119
  catch {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/nestjs",
3
- "version": "7.0.0-dev.1",
3
+ "version": "7.0.0-dev.2",
4
4
  "description": "NestJS module for MikroORM",
5
5
  "keywords": [
6
6
  "data-mapper",