@mikro-orm/knex 6.0.0-dev.319 → 6.0.0-dev.320

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.
@@ -379,7 +379,7 @@ class AbstractSqlDriver extends core_1.DatabaseDriver {
379
379
  else {
380
380
  const field = prop.fieldNames[0];
381
381
  if (!duplicates.includes(field) || !usedDups.includes(field)) {
382
- if (prop.customType && 'convertToDatabaseValueSQL' in prop.customType && !this.platform.isRaw(row[prop.name])) {
382
+ if (prop.customType && !prop.object && 'convertToDatabaseValueSQL' in prop.customType && !this.platform.isRaw(row[prop.name])) {
383
383
  keys.push(prop.customType.convertToDatabaseValueSQL('?', this.platform));
384
384
  }
385
385
  else {
@@ -527,7 +527,7 @@ class AbstractSqlDriver extends core_1.DatabaseDriver {
527
527
  if (key in data[idx]) {
528
528
  const pks = core_1.Utils.getOrderedPrimaryKeys(cond, meta);
529
529
  sql += ` when (${pkCond}) then `;
530
- if (prop.customType && 'convertToDatabaseValueSQL' in prop.customType && !this.platform.isRaw(data[idx][key])) {
530
+ if (prop.customType && !prop.object && 'convertToDatabaseValueSQL' in prop.customType && !this.platform.isRaw(data[idx][key])) {
531
531
  sql += prop.customType.convertToDatabaseValueSQL('?', this.platform);
532
532
  }
533
533
  else {
@@ -1144,7 +1144,7 @@ class AbstractSqlDriver extends core_1.DatabaseDriver {
1144
1144
  ret.push((0, core_1.raw)(`${prop.formula(a)} as ${aliased}`));
1145
1145
  });
1146
1146
  meta.props
1147
- .filter(prop => prop.hasConvertToDatabaseValueSQL || prop.hasConvertToJSValueSQL)
1147
+ .filter(prop => !prop.object && (prop.hasConvertToDatabaseValueSQL || prop.hasConvertToJSValueSQL))
1148
1148
  .forEach(prop => ret.push(prop.name));
1149
1149
  }
1150
1150
  // add joined relations after the root entity fields
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/knex",
3
- "version": "6.0.0-dev.319",
3
+ "version": "6.0.0-dev.320",
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",
@@ -66,6 +66,6 @@
66
66
  "@mikro-orm/core": "^5.0.0"
67
67
  },
68
68
  "peerDependencies": {
69
- "@mikro-orm/core": "6.0.0-dev.319"
69
+ "@mikro-orm/core": "6.0.0-dev.320"
70
70
  }
71
71
  }