@mikro-orm/knex 6.2.10-dev.46 → 6.2.10-dev.48
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 +2 -2
- package/query/QueryBuilder.js +4 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/knex",
|
|
3
|
-
"version": "6.2.10-dev.
|
|
3
|
+
"version": "6.2.10-dev.48",
|
|
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,7 +66,7 @@
|
|
|
66
66
|
"@mikro-orm/core": "^6.2.9"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
|
-
"@mikro-orm/core": "6.2.10-dev.
|
|
69
|
+
"@mikro-orm/core": "6.2.10-dev.48",
|
|
70
70
|
"better-sqlite3": "*",
|
|
71
71
|
"libsql": "*",
|
|
72
72
|
"mariadb": "*"
|
package/query/QueryBuilder.js
CHANGED
|
@@ -1224,7 +1224,7 @@ class QueryBuilder {
|
|
|
1224
1224
|
const prop = this.helper.getProperty(f, a);
|
|
1225
1225
|
const type = this.platform.castColumn(prop);
|
|
1226
1226
|
const fieldName = this.helper.mapper(field, this.type, undefined, null);
|
|
1227
|
-
if (!prop?.persist && !prop?.formula && !pks.includes(fieldName)) {
|
|
1227
|
+
if (!prop?.persist && !prop?.formula && !prop?.hasConvertToJSValueSQL && !pks.includes(fieldName)) {
|
|
1228
1228
|
addToSelect.push(fieldName);
|
|
1229
1229
|
}
|
|
1230
1230
|
const key = (0, core_1.raw)(`min(${this.knex.ref(fieldName)}${type})`);
|
|
@@ -1247,8 +1247,10 @@ class QueryBuilder {
|
|
|
1247
1247
|
}
|
|
1248
1248
|
return false;
|
|
1249
1249
|
});
|
|
1250
|
+
/* istanbul ignore next */
|
|
1250
1251
|
if (field instanceof core_1.RawQueryFragment) {
|
|
1251
|
-
|
|
1252
|
+
const sql = this.platform.formatQuery(field.sql, field.params);
|
|
1253
|
+
knexQuery.select(this.knex.raw(sql));
|
|
1252
1254
|
}
|
|
1253
1255
|
else if (field) {
|
|
1254
1256
|
knexQuery.select(field);
|