@mikro-orm/core 7.0.0-dev.272 → 7.0.0-dev.274

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.
@@ -91,6 +91,7 @@ export class MetadataDiscovery {
91
91
  }
92
92
  const desc = Object.getOwnPropertyDescriptor(meta.prototype, prop.name);
93
93
  if (desc?.get || desc?.set) {
94
+ this.initRelation(prop);
94
95
  this.initFieldName(prop);
95
96
  const accessor = prop.name;
96
97
  prop.name = typeof prop.accessor === 'string' ? prop.accessor : prop.name;
@@ -106,7 +107,10 @@ export class MetadataDiscovery {
106
107
  }
107
108
  else {
108
109
  const name = prop.name;
109
- prop.name = prop.accessor;
110
+ if (prop.kind === ReferenceKind.SCALAR || prop.kind === ReferenceKind.EMBEDDED) {
111
+ prop.name = prop.accessor;
112
+ }
113
+ this.initRelation(prop);
110
114
  this.initFieldName(prop);
111
115
  prop.serializedName ??= prop.accessor;
112
116
  prop.name = name;
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.272",
4
+ "version": "7.0.0-dev.274",
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",
package/utils/Utils.js CHANGED
@@ -123,7 +123,7 @@ export function parseJsonSafe(value) {
123
123
  }
124
124
  export class Utils {
125
125
  static PK_SEPARATOR = '~~~';
126
- static #ORM_VERSION = '7.0.0-dev.272';
126
+ static #ORM_VERSION = '7.0.0-dev.274';
127
127
  /**
128
128
  * Checks if the argument is instance of `Object`. Returns false for arrays.
129
129
  */