@mikro-orm/knex 6.0.0-dev.38 → 6.0.0-dev.39
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
CHANGED
|
@@ -273,7 +273,7 @@ class AbstractSqlDriver extends core_1.DatabaseDriver {
|
|
|
273
273
|
props.forEach(prop => {
|
|
274
274
|
if (prop.fieldNames.length > 1) {
|
|
275
275
|
params.push(...(row[prop.name] ?? prop.fieldNames.map(() => null)));
|
|
276
|
-
keys.push(...prop.fieldNames.map(
|
|
276
|
+
keys.push(...(row[prop.name] ?? prop.fieldNames).map(() => '?'));
|
|
277
277
|
}
|
|
278
278
|
else if (prop.customType && 'convertToDatabaseValueSQL' in prop.customType && !this.platform.isRaw(row[prop.name])) {
|
|
279
279
|
keys.push(prop.customType.convertToDatabaseValueSQL('?', this.platform));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/knex",
|
|
3
|
-
"version": "6.0.0-dev.
|
|
3
|
+
"version": "6.0.0-dev.39",
|
|
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,9 +63,9 @@
|
|
|
63
63
|
"sqlstring": "2.3.3"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
|
-
"@mikro-orm/core": "^5.6.
|
|
66
|
+
"@mikro-orm/core": "^5.6.10"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
|
-
"@mikro-orm/core": "~6.0.0-dev.
|
|
69
|
+
"@mikro-orm/core": "~6.0.0-dev.39"
|
|
70
70
|
}
|
|
71
71
|
}
|
package/query/QueryBuilder.js
CHANGED
|
@@ -701,7 +701,6 @@ class QueryBuilder {
|
|
|
701
701
|
}
|
|
702
702
|
if (data) {
|
|
703
703
|
if (core_1.Utils.isEntity(data)) {
|
|
704
|
-
// data = helper(data).toJSON();
|
|
705
704
|
data = this.em?.getComparator().prepareEntity(data) ?? (0, core_1.serialize)(data);
|
|
706
705
|
}
|
|
707
706
|
this._data = this.helper.processData(data, this.flags.has(core_1.QueryFlag.CONVERT_CUSTOM_TYPES));
|
|
@@ -609,7 +609,7 @@ class QueryBuilderHelper {
|
|
|
609
609
|
return;
|
|
610
610
|
}
|
|
611
611
|
if (prop.joinColumns && Array.isArray(data[k])) {
|
|
612
|
-
const copy = data[k];
|
|
612
|
+
const copy = core_1.Utils.flatten(data[k]);
|
|
613
613
|
delete data[k];
|
|
614
614
|
prop.joinColumns.forEach((joinColumn, idx) => data[joinColumn] = copy[idx]);
|
|
615
615
|
return;
|