@mikro-orm/knex 6.0.0-dev.259 → 6.0.0-dev.260
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 +5 -0
- package/package.json +2 -2
package/AbstractSqlDriver.js
CHANGED
|
@@ -465,6 +465,7 @@ class AbstractSqlDriver extends core_1.DatabaseDriver {
|
|
|
465
465
|
}
|
|
466
466
|
const collections = options.processCollections ? data.map(d => this.extractManyToMany(entityName, d)) : [];
|
|
467
467
|
const keys = new Set();
|
|
468
|
+
const fields = new Set();
|
|
468
469
|
const returning = new Set();
|
|
469
470
|
data.forEach(row => {
|
|
470
471
|
core_1.Utils.keys(row).forEach(k => {
|
|
@@ -498,6 +499,10 @@ class AbstractSqlDriver extends core_1.DatabaseDriver {
|
|
|
498
499
|
keys.forEach(key => {
|
|
499
500
|
const prop = meta.properties[key];
|
|
500
501
|
prop.fieldNames.forEach((fieldName, fieldNameIdx) => {
|
|
502
|
+
if (fields.has(fieldName)) {
|
|
503
|
+
return;
|
|
504
|
+
}
|
|
505
|
+
fields.add(fieldName);
|
|
501
506
|
sql += `${this.platform.quoteIdentifier(fieldName)} = case`;
|
|
502
507
|
where.forEach((cond, idx) => {
|
|
503
508
|
if (key in data[idx]) {
|
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.260",
|
|
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,6 +66,6 @@
|
|
|
66
66
|
"@mikro-orm/core": "^5.9.2"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
|
-
"@mikro-orm/core": "6.0.0-dev.
|
|
69
|
+
"@mikro-orm/core": "6.0.0-dev.260"
|
|
70
70
|
}
|
|
71
71
|
}
|