@mikro-orm/core 7.2.5-dev.9 → 7.2.6-dev.0

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.
@@ -1506,6 +1506,9 @@ export class MetadataDiscovery {
1506
1506
  if (isInverseSideRelation && rootProp && rootProp.type !== prop.type) {
1507
1507
  return;
1508
1508
  }
1509
+ // a sibling matching the root property must not drop the column variants of already renamed siblings
1510
+ newProp.stiFieldNames ??= rootProp?.stiFieldNames;
1511
+ newProp.stiFieldNameMap ??= rootProp?.stiFieldNameMap;
1509
1512
  meta.root.addProperty(newProp);
1510
1513
  });
1511
1514
  meta.tableName = meta.root.tableName;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/core",
3
- "version": "7.2.5-dev.9",
3
+ "version": "7.2.6-dev.0",
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
  "keywords": [
6
6
  "data-mapper",
@@ -502,7 +502,8 @@ export class ChangeSetPersister {
502
502
  }
503
503
  if (upsert) {
504
504
  for (const prop of meta.props) {
505
- if (prop.customType && prop.name in mapped) {
505
+ // null is not converted, the same way the hydrator handles it
506
+ if (prop.customType && mapped[prop.name] != null) {
506
507
  mapped[prop.name] = prop.customType.convertToJSValue(mapped[prop.name], this.#platform);
507
508
  }
508
509
  }
package/utils/Utils.js CHANGED
@@ -153,7 +153,7 @@ export function parseJsonSafe(value) {
153
153
  /** Collection of general-purpose utility methods used throughout the ORM. */
154
154
  export class Utils {
155
155
  static PK_SEPARATOR = '~~~';
156
- static #ORM_VERSION = '7.2.5-dev.9';
156
+ static #ORM_VERSION = '7.2.6-dev.0';
157
157
  /** Default session variable name backing an RLS filter argument (`current_setting('mikro.<filter>.<arg>')`). */
158
158
  static getRlsSettingName(filterName, argName) {
159
159
  return `mikro.${filterName}.${argName}`;