@mikro-orm/core 7.0.9-dev.11 → 7.0.9-dev.13

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/MikroORM.js CHANGED
@@ -173,7 +173,6 @@ export class MikroORM {
173
173
  this.em = this.driver.createEntityManager();
174
174
  this.em.global = true;
175
175
  this.#metadata.decorate(this.em);
176
- this.driver.setMetadata(this.#metadata);
177
176
  }
178
177
  /**
179
178
  * Allows dynamically discovering new entity by reference, handy for testing schema diffing.
@@ -3,7 +3,7 @@ import type { ConnectionType, Constructor, Dictionary, EntityData, EntityDiction
3
3
  import type { MetadataStorage } from '../metadata/MetadataStorage.js';
4
4
  import type { Connection, QueryResult, Transaction } from '../connections/Connection.js';
5
5
  import { type Configuration, type ConnectionOptions } from '../utils/Configuration.js';
6
- import { EntityComparator } from '../utils/EntityComparator.js';
6
+ import type { EntityComparator } from '../utils/EntityComparator.js';
7
7
  import { type QueryOrder } from '../enums.js';
8
8
  import type { Platform } from '../platforms/Platform.js';
9
9
  import type { Collection } from '../entity/Collection.js';
@@ -1,7 +1,6 @@
1
1
  import { EntityManagerType, } from './IDatabaseDriver.js';
2
2
  import { Utils } from '../utils/Utils.js';
3
3
  import { Cursor } from '../utils/Cursor.js';
4
- import { EntityComparator } from '../utils/EntityComparator.js';
5
4
  import { isRaw, raw } from '../utils/RawQueryFragment.js';
6
5
  import { QueryOrderNumeric, ReferenceKind } from '../enums.js';
7
6
  import { EntityManager } from '../EntityManager.js';
@@ -103,7 +102,7 @@ export class DatabaseDriver {
103
102
  /** Sets the metadata storage and initializes the comparator for all connections. */
104
103
  setMetadata(metadata) {
105
104
  this.metadata = metadata;
106
- this.comparator = new EntityComparator(this.metadata, this.platform);
105
+ this.comparator = this.config.getComparator(metadata);
107
106
  this.connection.setMetadata(metadata);
108
107
  this.connection.setPlatform(this.platform);
109
108
  this.replicas.forEach(replica => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/core",
3
- "version": "7.0.9-dev.11",
3
+ "version": "7.0.9-dev.13",
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
  "keywords": [
6
6
  "data-mapper",
package/utils/Utils.js CHANGED
@@ -132,7 +132,7 @@ export function parseJsonSafe(value) {
132
132
  /** Collection of general-purpose utility methods used throughout the ORM. */
133
133
  export class Utils {
134
134
  static PK_SEPARATOR = '~~~';
135
- static #ORM_VERSION = '7.0.9-dev.11';
135
+ static #ORM_VERSION = '7.0.9-dev.13';
136
136
  /**
137
137
  * Checks if the argument is instance of `Object`. Returns false for arrays.
138
138
  */