@mikro-orm/core 6.6.8-dev.1 → 6.6.8-dev.3
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/decorators/Property.d.ts
CHANGED
|
@@ -241,7 +241,7 @@ export interface PropertyOptions<Owner> {
|
|
|
241
241
|
* }
|
|
242
242
|
* ```
|
|
243
243
|
*/
|
|
244
|
-
accessor?: keyof Owner | boolean;
|
|
244
|
+
accessor?: keyof Owner | AnyString | boolean;
|
|
245
245
|
/**
|
|
246
246
|
* Set to define serialized primary key for MongoDB. (virtual)
|
|
247
247
|
* Alias for `@SerializedPrimaryKey()` decorator.
|
|
@@ -83,6 +83,7 @@ class MetadataDiscovery {
|
|
|
83
83
|
}
|
|
84
84
|
const desc = Object.getOwnPropertyDescriptor(meta.prototype, prop.name);
|
|
85
85
|
if (desc?.get || desc?.set) {
|
|
86
|
+
this.initRelation(prop);
|
|
86
87
|
this.initFieldName(prop);
|
|
87
88
|
const accessor = prop.name;
|
|
88
89
|
prop.name = typeof prop.accessor === 'string' ? prop.accessor : prop.name;
|
|
@@ -98,7 +99,10 @@ class MetadataDiscovery {
|
|
|
98
99
|
}
|
|
99
100
|
else {
|
|
100
101
|
const name = prop.name;
|
|
101
|
-
prop.
|
|
102
|
+
if (prop.kind === enums_1.ReferenceKind.SCALAR || prop.kind === enums_1.ReferenceKind.EMBEDDED) {
|
|
103
|
+
prop.name = prop.accessor;
|
|
104
|
+
}
|
|
105
|
+
this.initRelation(prop);
|
|
102
106
|
this.initFieldName(prop);
|
|
103
107
|
prop.serializedName ??= prop.accessor;
|
|
104
108
|
prop.name = name;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/core",
|
|
3
|
-
"version": "6.6.8-dev.
|
|
3
|
+
"version": "6.6.8-dev.3",
|
|
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.8-dev.
|
|
67
|
+
"mikro-orm": "6.6.8-dev.3",
|
|
68
68
|
"reflect-metadata": "0.2.2"
|
|
69
69
|
}
|
|
70
70
|
}
|