@mikro-orm/knex 5.8.3-dev.6 → 5.8.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.
- package/AbstractSqlDriver.js +3 -1
- package/package.json +5 -5
package/AbstractSqlDriver.js
CHANGED
|
@@ -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
|
|
3
|
+
"version": "5.8.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",
|
|
@@ -63,12 +63,12 @@
|
|
|
63
63
|
"sqlstring": "2.3.3"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
|
-
"@mikro-orm/core": "^5.8.
|
|
66
|
+
"@mikro-orm/core": "^5.8.3"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
|
-
"@mikro-orm/core": "
|
|
70
|
-
"@mikro-orm/entity-generator": "
|
|
71
|
-
"@mikro-orm/migrations": "
|
|
69
|
+
"@mikro-orm/core": "^5.0.0",
|
|
70
|
+
"@mikro-orm/entity-generator": "^5.0.0",
|
|
71
|
+
"@mikro-orm/migrations": "^5.0.0",
|
|
72
72
|
"better-sqlite3": "*",
|
|
73
73
|
"mssql": "*",
|
|
74
74
|
"mysql": "*",
|