@mikro-orm/knex 5.8.3-dev.6 → 5.8.3-dev.7

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.
@@ -155,10 +155,12 @@ class AbstractSqlDriver extends core_1.DatabaseDriver {
155
155
  return root[`${relationAlias}__${name}`] != null;
156
156
  }));
157
157
  if (!hasPK) {
158
- // initialize empty collections
159
158
  if ([core_1.ReferenceType.MANY_TO_MANY, core_1.ReferenceType.ONE_TO_MANY].includes(relation.reference)) {
160
159
  result[relation.name] = result[relation.name] || [];
161
160
  }
161
+ if ([core_1.ReferenceType.MANY_TO_ONE, core_1.ReferenceType.ONE_TO_ONE].includes(relation.reference)) {
162
+ result[relation.name] = null;
163
+ }
162
164
  return;
163
165
  }
164
166
  meta2.props
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/knex",
3
- "version": "5.8.3-dev.6",
3
+ "version": "5.8.3-dev.7",
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,9 +66,9 @@
66
66
  "@mikro-orm/core": "^5.8.2"
67
67
  },
68
68
  "peerDependencies": {
69
- "@mikro-orm/core": "~5.8.3-dev.6",
70
- "@mikro-orm/entity-generator": "~5.8.3-dev.6",
71
- "@mikro-orm/migrations": "~5.8.3-dev.6",
69
+ "@mikro-orm/core": "~5.8.3-dev.7",
70
+ "@mikro-orm/entity-generator": "~5.8.3-dev.7",
71
+ "@mikro-orm/migrations": "~5.8.3-dev.7",
72
72
  "better-sqlite3": "*",
73
73
  "mssql": "*",
74
74
  "mysql": "*",