@mikro-orm/knex 6.2.10-dev.43 → 6.2.10-dev.45
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/knex",
|
|
3
|
-
"version": "6.2.10-dev.
|
|
3
|
+
"version": "6.2.10-dev.45",
|
|
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.45",
|
|
70
70
|
"better-sqlite3": "*",
|
|
71
71
|
"libsql": "*",
|
|
72
72
|
"mariadb": "*"
|
|
@@ -67,7 +67,8 @@ class QueryBuilderHelper {
|
|
|
67
67
|
}
|
|
68
68
|
const rawField = core_1.RawQueryFragment.getKnownFragment(field);
|
|
69
69
|
if (rawField) {
|
|
70
|
-
|
|
70
|
+
// sometimes knex is confusing the binding positions, we need to interpolate early
|
|
71
|
+
return this.knex.raw(this.platform.formatQuery(rawField.sql, rawField.params));
|
|
71
72
|
}
|
|
72
73
|
const [a, f] = this.splitField(field);
|
|
73
74
|
const prop = this.getProperty(f, a);
|
|
@@ -194,7 +195,8 @@ class QueryBuilderHelper {
|
|
|
194
195
|
join.primaryKeys.forEach((primaryKey, idx) => {
|
|
195
196
|
const right = `${join.alias}.${join.joinColumns[idx]}`;
|
|
196
197
|
if (join.prop.formula) {
|
|
197
|
-
const
|
|
198
|
+
const alias = this.platform.quoteIdentifier(join.ownerAlias);
|
|
199
|
+
const left = join.prop.formula(alias);
|
|
198
200
|
conditions.push(`${left} = ${this.knex.ref(right)}`);
|
|
199
201
|
return;
|
|
200
202
|
}
|