@mikro-orm/knex 6.5.6-dev.7 → 6.5.6-dev.9

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.
@@ -392,7 +392,12 @@ class AbstractSqlDriver extends core_1.DatabaseDriver {
392
392
  sql += ' ' + data.map(() => `select null as ${this.platform.quoteIdentifier(pks[0])}`).join(' union all ');
393
393
  }
394
394
  const addParams = (prop, row) => {
395
- let value = row[prop.name] ?? prop.default;
395
+ const rowValue = row[prop.name];
396
+ if (prop.nullable && rowValue === null) {
397
+ params.push(null);
398
+ return;
399
+ }
400
+ let value = rowValue ?? prop.default;
396
401
  if (prop.kind === core_1.ReferenceKind.EMBEDDED && prop.object) {
397
402
  if (prop.array && value) {
398
403
  value = this.platform.cloneEmbeddable(value);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/knex",
3
- "version": "6.5.6-dev.7",
3
+ "version": "6.5.6-dev.9",
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.5.5"
67
67
  },
68
68
  "peerDependencies": {
69
- "@mikro-orm/core": "6.5.6-dev.7",
69
+ "@mikro-orm/core": "6.5.6-dev.9",
70
70
  "better-sqlite3": "*",
71
71
  "libsql": "*",
72
72
  "mariadb": "*"