@mikro-orm/knex 6.4.7-dev.21 → 6.4.7-dev.22

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.
@@ -254,6 +254,9 @@ class AbstractSqlDriver extends core_1.DatabaseDriver {
254
254
  : meta2.props.filter(prop => this.platform.shouldHaveColumn(prop, hint.children || []));
255
255
  const tz = this.platform.getTimezone();
256
256
  for (const prop of targetProps) {
257
+ if (prop.fieldNames.every(name => typeof root[`${relationAlias}__${name}`] === 'undefined')) {
258
+ continue;
259
+ }
257
260
  if (prop.fieldNames.length > 1) { // composite keys
258
261
  const fk = prop.fieldNames.map(name => root[`${relationAlias}__${name}`]);
259
262
  const pk = core_1.Utils.mapFlatCompositePrimaryKey(fk, prop);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/knex",
3
- "version": "6.4.7-dev.21",
3
+ "version": "6.4.7-dev.22",
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.6"
67
67
  },
68
68
  "peerDependencies": {
69
- "@mikro-orm/core": "6.4.7-dev.21",
69
+ "@mikro-orm/core": "6.4.7-dev.22",
70
70
  "better-sqlite3": "*",
71
71
  "libsql": "*",
72
72
  "mariadb": "*"