@mikro-orm/knex 6.4.9-dev.1 → 6.4.9-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.
@@ -442,7 +442,7 @@ class AbstractSqlDriver extends core_1.DatabaseDriver {
442
442
  else {
443
443
  const field = prop.fieldNames[0];
444
444
  if (!duplicates.includes(field) || !usedDups.includes(field)) {
445
- if (prop.customType && !prop.object && 'convertToDatabaseValueSQL' in prop.customType && !this.platform.isRaw(row[prop.name])) {
445
+ if (prop.customType && !prop.object && 'convertToDatabaseValueSQL' in prop.customType && row[prop.name] != null && !this.platform.isRaw(row[prop.name])) {
446
446
  keys.push(prop.customType.convertToDatabaseValueSQL('?', this.platform));
447
447
  }
448
448
  else {
@@ -593,7 +593,7 @@ class AbstractSqlDriver extends core_1.DatabaseDriver {
593
593
  if (key in data[idx]) {
594
594
  const pks = core_1.Utils.getOrderedPrimaryKeys(cond, meta);
595
595
  sql += ` when (${pkCond}) then `;
596
- if (prop.customType && !prop.object && 'convertToDatabaseValueSQL' in prop.customType && !this.platform.isRaw(data[idx][key])) {
596
+ if (prop.customType && !prop.object && 'convertToDatabaseValueSQL' in prop.customType && data[idx][prop.name] != null && !this.platform.isRaw(data[idx][key])) {
597
597
  sql += prop.customType.convertToDatabaseValueSQL('?', this.platform);
598
598
  }
599
599
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/knex",
3
- "version": "6.4.9-dev.1",
3
+ "version": "6.4.9-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",
@@ -66,7 +66,7 @@
66
66
  "@mikro-orm/core": "^6.4.8"
67
67
  },
68
68
  "peerDependencies": {
69
- "@mikro-orm/core": "6.4.9-dev.1",
69
+ "@mikro-orm/core": "6.4.9-dev.3",
70
70
  "better-sqlite3": "*",
71
71
  "libsql": "*",
72
72
  "mariadb": "*"