@mikro-orm/knex 6.0.0-dev.166 → 6.0.0-dev.168
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 +1 -2
- package/package.json +2 -2
package/AbstractSqlDriver.js
CHANGED
|
@@ -179,7 +179,6 @@ class AbstractSqlDriver extends core_1.DatabaseDriver {
|
|
|
179
179
|
}
|
|
180
180
|
return;
|
|
181
181
|
}
|
|
182
|
-
const tz = this.platform.getTimezone();
|
|
183
182
|
meta2.props
|
|
184
183
|
.filter(prop => prop.persist === false && prop.fieldNames)
|
|
185
184
|
.forEach(prop => {
|
|
@@ -407,7 +406,7 @@ class AbstractSqlDriver extends core_1.DatabaseDriver {
|
|
|
407
406
|
options.convertCustomTypes ??= true;
|
|
408
407
|
const meta = this.metadata.get(entityName);
|
|
409
408
|
if (options.upsert) {
|
|
410
|
-
const uniqueFields = options.onConflictFields ?? (core_1.Utils.isPlainObject(where[0]) ? Object.keys(where[0]) : meta.primaryKeys);
|
|
409
|
+
const uniqueFields = options.onConflictFields ?? (core_1.Utils.isPlainObject(where[0]) ? Object.keys(where[0]).flatMap(key => core_1.Utils.splitPrimaryKeys(key)) : meta.primaryKeys);
|
|
411
410
|
const qb = this.createQueryBuilder(entityName, options.ctx, 'write', options.convertCustomTypes).withSchema(this.getSchemaName(meta, options));
|
|
412
411
|
const returning = (0, core_1.getOnConflictReturningFields)(meta, data[0], uniqueFields, options);
|
|
413
412
|
qb.insert(data)
|
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.168",
|
|
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.168"
|
|
70
70
|
}
|
|
71
71
|
}
|