@mikro-orm/knex 6.2.5-dev.6 → 6.2.5-dev.8
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 +5 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/knex",
|
|
3
|
-
"version": "6.2.5-dev.
|
|
3
|
+
"version": "6.2.5-dev.8",
|
|
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,6 +66,6 @@
|
|
|
66
66
|
"@mikro-orm/core": "^6.2.4"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
|
-
"@mikro-orm/core": "6.2.5-dev.
|
|
69
|
+
"@mikro-orm/core": "6.2.5-dev.8"
|
|
70
70
|
}
|
|
71
71
|
}
|
package/query/QueryBuilder.js
CHANGED
|
@@ -1199,7 +1199,11 @@ class QueryBuilder {
|
|
|
1199
1199
|
const pks = this.prepareFields(meta.primaryKeys, 'sub-query');
|
|
1200
1200
|
const subQuery = this.clone(['_orderBy', '_fields']).select(pks).groupBy(pks).limit(this._limit);
|
|
1201
1201
|
// revert the on conditions added via populateWhere, we want to apply those only once
|
|
1202
|
-
Object.values(subQuery._joins)
|
|
1202
|
+
for (const join of Object.values(subQuery._joins)) {
|
|
1203
|
+
if (join.cond_) {
|
|
1204
|
+
join.cond = join.cond_;
|
|
1205
|
+
}
|
|
1206
|
+
}
|
|
1203
1207
|
if (this._offset) {
|
|
1204
1208
|
subQuery.offset(this._offset);
|
|
1205
1209
|
}
|