@mikro-orm/core 7.0.0-dev.5 → 7.0.0-dev.6

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.
@@ -905,11 +905,13 @@ export class MetadataDiscovery {
905
905
  }
906
906
  if (!meta.root.discriminatorMap) {
907
907
  meta.root.discriminatorMap = {};
908
- const children = metadata.filter(m => m.root.className === meta.root.className && !m.abstract);
909
- children.forEach(m => {
908
+ const children = metadata
909
+ .filter(m => m.root.className === meta.root.className && !m.abstract)
910
+ .sort((a, b) => a.className.localeCompare(b.className));
911
+ for (const m of children) {
910
912
  const name = m.discriminatorValue ?? this.namingStrategy.classToTableName(m.className);
911
913
  meta.root.discriminatorMap[name] = m.className;
912
- });
914
+ }
913
915
  }
914
916
  meta.discriminatorValue = Object.entries(meta.root.discriminatorMap).find(([, className]) => className === meta.className)?.[0];
915
917
  if (!meta.root.properties[meta.root.discriminatorColumn]) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mikro-orm/core",
3
3
  "type": "module",
4
- "version": "7.0.0-dev.5",
4
+ "version": "7.0.0-dev.6",
5
5
  "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.",
6
6
  "exports": {
7
7
  "./package.json": "./package.json",
@@ -55,7 +55,7 @@
55
55
  "dotenv": "16.4.7",
56
56
  "esprima": "4.0.1",
57
57
  "globby": "11.1.0",
58
- "mikro-orm": "7.0.0-dev.5",
58
+ "mikro-orm": "7.0.0-dev.6",
59
59
  "reflect-metadata": "0.2.2"
60
60
  }
61
61
  }