@mikro-orm/nestjs 7.0.0 → 7.0.1-dev.0
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.
- package/mikro-orm-core.module.js +4 -0
- package/package.json +1 -1
package/mikro-orm-core.module.js
CHANGED
|
@@ -84,6 +84,10 @@ let MikroOrmCoreModule = MikroOrmCoreModule_1 = class MikroOrmCoreModule {
|
|
|
84
84
|
if (typeof options === 'object' && options && 'driver' in options && !('useFactory' in options)) {
|
|
85
85
|
config = new Configuration(options, false);
|
|
86
86
|
}
|
|
87
|
+
// For async options with explicit driver hint, create a minimal config for EM type detection
|
|
88
|
+
if (!config && 'driver' in options && options.driver) {
|
|
89
|
+
config = new Configuration({ driver: options.driver }, false);
|
|
90
|
+
}
|
|
87
91
|
if (!config && 'useFactory' in options) {
|
|
88
92
|
config = new Configuration(await options.useFactory(), false);
|
|
89
93
|
}
|