@mikro-orm/core 6.4.5-dev.5 → 6.4.5-dev.7

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.
@@ -499,15 +499,14 @@ class EntityLoader {
499
499
  }
500
500
  if (options.fields) {
501
501
  return children
502
- .filter(e => {
503
- const target = e[field];
502
+ .map(e => Reference_1.Reference.unwrapReference(e[field]))
503
+ .filter(target => {
504
504
  const wrapped = (0, wrap_1.helper)(target);
505
505
  const childFields = options.fields
506
506
  .filter(f => f.startsWith(`${field}.`))
507
507
  .map(f => f.substring(field.length + 1));
508
508
  return !wrapped.__initialized || !childFields.every(cf => this.isPropertyLoaded(target, cf));
509
- })
510
- .map(e => Reference_1.Reference.unwrapReference(e[field]));
509
+ });
511
510
  }
512
511
  return children
513
512
  .filter(e => !e[field].__helper.__initialized)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/core",
3
- "version": "6.4.5-dev.5",
3
+ "version": "6.4.5-dev.7",
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.5-dev.5",
67
+ "mikro-orm": "6.4.5-dev.7",
68
68
  "reflect-metadata": "0.2.2"
69
69
  }
70
70
  }
package/typings.d.ts CHANGED
@@ -659,7 +659,7 @@ export interface IMigrationGenerator {
659
659
  /**
660
660
  * Returns the file contents of given migration.
661
661
  */
662
- generateMigrationFile(className: string, diff: MigrationDiff): string;
662
+ generateMigrationFile(className: string, diff: MigrationDiff): MaybePromise<string>;
663
663
  }
664
664
  export interface Migration {
665
665
  up(): Promise<void> | void;