@mikro-orm/knex 6.2.9-dev.0 → 6.2.9-dev.10

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.
@@ -389,12 +389,21 @@ class AbstractSqlDriver extends core_1.DatabaseDriver {
389
389
  const usedDups = [];
390
390
  props.forEach(prop => {
391
391
  if (prop.fieldNames.length > 1) {
392
- const param = core_1.Utils.flatten([...row[prop.name] ?? prop.fieldNames.map(() => null)]);
393
- const key = param.map(() => '?');
392
+ const newFields = [];
393
+ const allParam = [...row[prop.name] ?? prop.fieldNames.map(() => null)];
394
+ const newParam = [];
394
395
  prop.fieldNames.forEach((field, idx) => {
396
+ if (usedDups.includes(field)) {
397
+ return;
398
+ }
399
+ newFields.push(field);
400
+ newParam.push(allParam[idx]);
401
+ });
402
+ const param = core_1.Utils.flatten(newParam);
403
+ newFields.forEach((field, idx) => {
395
404
  if (!duplicates.includes(field) || !usedDups.includes(field)) {
396
405
  params.push(param[idx]);
397
- keys.push(key[idx]);
406
+ keys.push('?');
398
407
  usedDups.push(field);
399
408
  }
400
409
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/knex",
3
- "version": "6.2.9-dev.0",
3
+ "version": "6.2.9-dev.10",
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": "^6.2.8"
67
67
  },
68
68
  "peerDependencies": {
69
- "@mikro-orm/core": "6.2.9-dev.0"
69
+ "@mikro-orm/core": "6.2.9-dev.10"
70
70
  }
71
71
  }
@@ -305,8 +305,8 @@ class SchemaComparator {
305
305
  continue;
306
306
  }
307
307
  const [removedColumn, addedColumn] = candidateColumns[0];
308
- const removedColumnName = removedColumn.name.toLowerCase();
309
- const addedColumnName = addedColumn.name.toLowerCase();
308
+ const removedColumnName = removedColumn.name;
309
+ const addedColumnName = addedColumn.name;
310
310
  /* istanbul ignore if */
311
311
  if (tableDifferences.renamedColumns[removedColumnName]) {
312
312
  continue;
@@ -340,8 +340,8 @@ class SchemaComparator {
340
340
  continue;
341
341
  }
342
342
  const [removedIndex, addedIndex] = candidateIndexes[0];
343
- const removedIndexName = removedIndex.keyName.toLowerCase();
344
- const addedIndexName = addedIndex.keyName.toLowerCase();
343
+ const removedIndexName = removedIndex.keyName;
344
+ const addedIndexName = addedIndex.keyName;
345
345
  if (tableDifferences.renamedIndexes[removedIndexName]) {
346
346
  continue;
347
347
  }