@mikro-orm/core 6.3.1-dev.16 → 6.3.1-dev.17

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.
@@ -18,10 +18,12 @@ function CreateRequestContext(getContext, respectExistingContext = false) {
18
18
  let orm;
19
19
  let em;
20
20
  if (typeof getContext === 'function') {
21
- orm = await (getContext(this) ?? this.orm);
21
+ const context = await getContext(this);
22
+ orm = context ?? await this.orm;
23
+ em = context ?? await this.em;
22
24
  }
23
25
  else if (getContext) {
24
- orm = await getContext;
26
+ orm = em = await getContext;
25
27
  }
26
28
  else {
27
29
  orm = await this.orm;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/core",
3
- "version": "6.3.1-dev.16",
3
+ "version": "6.3.1-dev.17",
4
4
  "description": "TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.",
5
5
  "main": "index.js",
6
6
  "module": "index.mjs",
@@ -64,7 +64,7 @@
64
64
  "esprima": "4.0.1",
65
65
  "fs-extra": "11.2.0",
66
66
  "globby": "11.1.0",
67
- "mikro-orm": "6.3.1-dev.16",
67
+ "mikro-orm": "6.3.1-dev.17",
68
68
  "reflect-metadata": "0.2.2"
69
69
  }
70
70
  }