@mikro-orm/knex 5.7.13-dev.18 → 5.7.13-dev.19

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.
@@ -270,7 +270,7 @@ class AbstractSqlDriver extends core_1.DatabaseDriver {
270
270
  const keys = [];
271
271
  props.forEach(prop => {
272
272
  if (prop.fieldNames.length > 1) {
273
- const param = row[prop.name] ?? prop.fieldNames.map(() => null);
273
+ const param = [...row[prop.name] ?? prop.fieldNames.map(() => null)];
274
274
  const key = (row[prop.name] ?? prop.fieldNames).map(() => '?');
275
275
  prop.fieldNames.forEach((field, idx) => {
276
276
  if (duplicates.includes(field)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/knex",
3
- "version": "5.7.13-dev.18",
3
+ "version": "5.7.13-dev.19",
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,9 +66,9 @@
66
66
  "@mikro-orm/core": "^5.7.12"
67
67
  },
68
68
  "peerDependencies": {
69
- "@mikro-orm/core": "~5.7.13-dev.18",
70
- "@mikro-orm/entity-generator": "~5.7.13-dev.18",
71
- "@mikro-orm/migrations": "~5.7.13-dev.18",
69
+ "@mikro-orm/core": "~5.7.13-dev.19",
70
+ "@mikro-orm/entity-generator": "~5.7.13-dev.19",
71
+ "@mikro-orm/migrations": "~5.7.13-dev.19",
72
72
  "better-sqlite3": "*",
73
73
  "mssql": "*",
74
74
  "mysql": "*",
@@ -631,7 +631,7 @@ class QueryBuilderHelper {
631
631
  if (prop.hasConvertToDatabaseValueSQL && !this.platform.isRaw(data[k])) {
632
632
  const quoted = this.platform.quoteValue(data[k]);
633
633
  const sql = prop.customType.convertToDatabaseValueSQL(quoted, this.platform);
634
- data[k] = this.knex.raw(sql.replace(/\?/, '\\?'));
634
+ data[k] = this.knex.raw(sql.replace(/\?/g, '\\?'));
635
635
  }
636
636
  if (!prop.customType && (Array.isArray(data[k]) || core_1.Utils.isPlainObject(data[k]))) {
637
637
  data[k] = JSON.stringify(data[k]);