@mikro-orm/core 6.4.7 → 6.4.8-dev.1

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.
@@ -12,7 +12,6 @@ export interface MatchingOptions<T extends object, P extends string = never> ext
12
12
  export declare class Collection<T extends object, O extends object = object> extends ArrayCollection<T, O> {
13
13
  private readonly?;
14
14
  private _populated?;
15
- private _em?;
16
15
  private _snapshot?;
17
16
  constructor(owner: O, items?: T[], initialized?: boolean);
18
17
  /**
@@ -10,7 +10,6 @@ const wrap_1 = require("./wrap");
10
10
  class Collection extends ArrayCollection_1.ArrayCollection {
11
11
  readonly;
12
12
  _populated;
13
- _em;
14
13
  // this is for some reason needed for TS, otherwise it can fail with `Type instantiation is excessively deep and possibly infinite.`
15
14
  _snapshot;
16
15
  constructor(owner, items, initialized = true) {
@@ -257,7 +256,7 @@ class Collection extends ArrayCollection_1.ArrayCollection {
257
256
  }
258
257
  getEntityManager(items = [], required = true) {
259
258
  const wrapped = (0, wrap_1.helper)(this.owner);
260
- let em = (this._em ?? wrapped.__em);
259
+ let em = wrapped.__em;
261
260
  if (!em) {
262
261
  for (const i of items) {
263
262
  if (i && (0, wrap_1.helper)(i).__em) {
@@ -266,9 +265,6 @@ class Collection extends ArrayCollection_1.ArrayCollection {
266
265
  }
267
266
  }
268
267
  }
269
- if (em) {
270
- Object.defineProperty(this, '_em', { value: em });
271
- }
272
268
  if (!em && required) {
273
269
  throw errors_1.ValidationError.entityNotManaged(this.owner);
274
270
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/core",
3
- "version": "6.4.7",
3
+ "version": "6.4.8-dev.1",
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.3.0",
66
66
  "globby": "11.1.0",
67
- "mikro-orm": "6.4.7",
67
+ "mikro-orm": "6.4.8-dev.1",
68
68
  "reflect-metadata": "0.2.2"
69
69
  }
70
70
  }