@mikro-orm/core 6.6.5-dev.1 → 6.6.5-dev.2
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.
|
@@ -974,7 +974,8 @@ class MetadataDiscovery {
|
|
|
974
974
|
let i = 1;
|
|
975
975
|
Object.values(meta.properties).forEach(prop => {
|
|
976
976
|
const newProp = { ...prop };
|
|
977
|
-
|
|
977
|
+
const rootProp = meta.root.properties[prop.name];
|
|
978
|
+
if (rootProp && (rootProp.type !== prop.type || (rootProp.fieldNames && prop.fieldNames && !(0, Utils_1.compareArrays)(rootProp.fieldNames, prop.fieldNames)))) {
|
|
978
979
|
const name = newProp.name;
|
|
979
980
|
this.initFieldName(newProp, newProp.object);
|
|
980
981
|
newProp.name = name + '_' + (i++);
|
|
@@ -985,11 +986,11 @@ class MetadataDiscovery {
|
|
|
985
986
|
newProp.inherited = true;
|
|
986
987
|
return;
|
|
987
988
|
}
|
|
988
|
-
if (prop.enum && prop.items &&
|
|
989
|
-
newProp.items = Utils_1.Utils.unique([...
|
|
989
|
+
if (prop.enum && prop.items && rootProp?.items) {
|
|
990
|
+
newProp.items = Utils_1.Utils.unique([...rootProp.items, ...prop.items]);
|
|
990
991
|
}
|
|
991
992
|
newProp.nullable = true;
|
|
992
|
-
newProp.inherited = !
|
|
993
|
+
newProp.inherited = !rootProp;
|
|
993
994
|
meta.root.addProperty(newProp);
|
|
994
995
|
});
|
|
995
996
|
meta.collection = meta.root.collection;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/core",
|
|
3
|
-
"version": "6.6.5-dev.
|
|
3
|
+
"version": "6.6.5-dev.2",
|
|
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.3",
|
|
66
66
|
"globby": "11.1.0",
|
|
67
|
-
"mikro-orm": "6.6.5-dev.
|
|
67
|
+
"mikro-orm": "6.6.5-dev.2",
|
|
68
68
|
"reflect-metadata": "0.2.2"
|
|
69
69
|
}
|
|
70
70
|
}
|