@mikro-orm/sql 7.1.5-dev.16 → 7.1.5-dev.17

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/sql",
3
- "version": "7.1.5-dev.16",
3
+ "version": "7.1.5-dev.17",
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
  "keywords": [
6
6
  "data-mapper",
@@ -53,7 +53,7 @@
53
53
  "@mikro-orm/core": "^7.1.4"
54
54
  },
55
55
  "peerDependencies": {
56
- "@mikro-orm/core": "7.1.5-dev.16"
56
+ "@mikro-orm/core": "7.1.5-dev.17"
57
57
  },
58
58
  "engines": {
59
59
  "node": ">= 22.17.0"
@@ -600,6 +600,8 @@ export class QueryBuilderHelper {
600
600
  }
601
601
  return `(${tmp.join(', ')})`;
602
602
  }
603
+ // array custom types (e.g. `$contains`/`$overlap` on `string[]` columns) are converted to a single
604
+ // array literal, so we emit a single bound parameter — not one per element wrapped in a tuple
603
605
  if (prop?.customType instanceof ArrayType) {
604
606
  const item = prop.customType.convertToDatabaseValue(value, this.#platform, {
605
607
  fromQuery: true,
@@ -607,10 +609,9 @@ export class QueryBuilderHelper {
607
609
  mode: 'query',
608
610
  });
609
611
  params.push(item);
612
+ return '?';
610
613
  }
611
- else {
612
- value.forEach(p => params.push(p));
613
- }
614
+ value.forEach(p => params.push(p));
614
615
  return `(${value.map(() => '?').join(', ')})`;
615
616
  }
616
617
  if (value === null) {