@mikro-orm/core 6.3.8-dev.7 → 6.3.8-dev.9

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.
@@ -997,7 +997,7 @@ class MetadataDiscovery {
997
997
  }
998
998
  // but still use object values for type inference if not explicitly set, e.g. `createdAt = new Date()`
999
999
  if (prop.kind === enums_1.ReferenceKind.SCALAR && prop.type == null && entity1[prop.name] != null) {
1000
- prop.type = Utils_1.Utils.getObjectType(entity1[prop.name]);
1000
+ prop.type = prop.runtimeType = Utils_1.Utils.getObjectType(entity1[prop.name]);
1001
1001
  }
1002
1002
  }
1003
1003
  catch {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/core",
3
- "version": "6.3.8-dev.7",
3
+ "version": "6.3.8-dev.9",
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.8-dev.7",
67
+ "mikro-orm": "6.3.8-dev.9",
68
68
  "reflect-metadata": "0.2.2"
69
69
  }
70
70
  }
@@ -84,7 +84,7 @@ export declare class Configuration<D extends IDatabaseDriver = IDatabaseDriver,
84
84
  glob: string;
85
85
  silent: false;
86
86
  transactional: true;
87
- disableForeignKeys: true;
87
+ disableForeignKeys: false;
88
88
  allOrNothing: true;
89
89
  dropTables: true;
90
90
  safe: false;
@@ -93,7 +93,7 @@ export declare class Configuration<D extends IDatabaseDriver = IDatabaseDriver,
93
93
  fileName: (timestamp: string, name?: string) => string;
94
94
  };
95
95
  schemaGenerator: {
96
- disableForeignKeys: true;
96
+ disableForeignKeys: false;
97
97
  createForeignKeyConstraints: true;
98
98
  ignoreSchema: never[];
99
99
  };
@@ -79,7 +79,7 @@ class Configuration {
79
79
  glob: '!(*.d).{js,ts,cjs}',
80
80
  silent: false,
81
81
  transactional: true,
82
- disableForeignKeys: true,
82
+ disableForeignKeys: false,
83
83
  allOrNothing: true,
84
84
  dropTables: true,
85
85
  safe: false,
@@ -88,7 +88,7 @@ class Configuration {
88
88
  fileName: (timestamp, name) => `Migration${timestamp}${name ? '_' + name : ''}`,
89
89
  },
90
90
  schemaGenerator: {
91
- disableForeignKeys: true,
91
+ disableForeignKeys: false,
92
92
  createForeignKeyConstraints: true,
93
93
  ignoreSchema: [],
94
94
  },
@@ -270,7 +270,7 @@ class EntityComparator {
270
270
  lines.push(`${padding} ${key} = parseDate(${value});`);
271
271
  }
272
272
  else {
273
- lines.push(`${padding} } else if (typeof ${value} === 'number' || ${value}.includes('+') || ${value}.endsWith('Z')) {`);
273
+ lines.push(`${padding} } else if (typeof ${value} === 'number' || ${value}.includes('+') || ${value}.lastIndexOf('-') > 10 || ${value}.endsWith('Z')) {`);
274
274
  lines.push(`${padding} ${key} = parseDate(${value});`);
275
275
  lines.push(`${padding} } else {`);
276
276
  lines.push(`${padding} ${key} = parseDate(${value} + '${tz}');`);