@mikro-orm/core 6.3.4-dev.11 → 6.3.4-dev.13

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/core",
3
- "version": "6.3.4-dev.11",
3
+ "version": "6.3.4-dev.13",
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",
@@ -64,7 +64,7 @@
64
64
  "esprima": "4.0.1",
65
65
  "fs-extra": "11.2.0",
66
66
  "globby": "11.1.0",
67
- "mikro-orm": "6.3.4-dev.11",
67
+ "mikro-orm": "6.3.4-dev.13",
68
68
  "reflect-metadata": "0.2.2"
69
69
  }
70
70
  }
@@ -33,6 +33,9 @@ class BigIntType extends Type_1.Type {
33
33
  }
34
34
  }
35
35
  toJSON(value) {
36
+ if (this.mode === 'number') {
37
+ return value;
38
+ }
36
39
  return this.convertToDatabaseValue(value);
37
40
  }
38
41
  getColumnType(prop, platform) {
@@ -125,19 +125,9 @@ class QueryHelper {
125
125
  return this.processJsonCondition(o, value, [prop.fieldNames[0]], platform, aliased);
126
126
  }
127
127
  if (Array.isArray(value) && !Utils_1.Utils.isOperator(key) && !QueryHelper.isSupportedOperator(key) && !key.includes('?') && options.type !== 'orderBy') {
128
- if (platform.allowsComparingTuples()) {
129
- // comparing single composite key - use $eq instead of $in
130
- const op = !value.every(v => Array.isArray(v)) && composite ? '$eq' : '$in';
131
- o[key] = { [op]: value };
132
- }
133
- else {
134
- if (!value.every(v => Array.isArray(v)) && composite) {
135
- o[key] = { $in: [value] };
136
- }
137
- else {
138
- o[key] = { $in: value };
139
- }
140
- }
128
+ // comparing single composite key - use $eq instead of $in
129
+ const op = composite && !value.every(v => Array.isArray(v)) ? '$eq' : '$in';
130
+ o[key] = { [op]: value };
141
131
  return o;
142
132
  }
143
133
  if (Utils_1.Utils.isPlainObject(value)) {