@mikro-orm/knex 6.0.0-dev.125 → 6.0.0-dev.126
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/AbstractSqlDriver.js +6 -4
- package/package.json +3 -3
package/AbstractSqlDriver.js
CHANGED
|
@@ -117,12 +117,14 @@ class AbstractSqlDriver extends core_1.DatabaseDriver {
|
|
|
117
117
|
}
|
|
118
118
|
async wrapVirtualExpressionInSubquery(meta, expression, where, options, type) {
|
|
119
119
|
const qb = this.createQueryBuilder(meta.className, options?.ctx, options.connectionType, options.convertCustomTypes)
|
|
120
|
-
.limit(options?.limit, options?.offset)
|
|
121
120
|
.indexHint(options.indexHint)
|
|
122
121
|
.comment(options.comments)
|
|
123
122
|
.hintComment(options.hintComments);
|
|
124
|
-
if (
|
|
125
|
-
qb.
|
|
123
|
+
if (type !== query_1.QueryType.COUNT) {
|
|
124
|
+
qb.limit(options?.limit, options?.offset);
|
|
125
|
+
if (options.orderBy) {
|
|
126
|
+
qb.orderBy(options.orderBy);
|
|
127
|
+
}
|
|
126
128
|
}
|
|
127
129
|
qb.where(where);
|
|
128
130
|
const kqb = qb.getKnexQuery().clear('select');
|
|
@@ -709,7 +711,7 @@ class AbstractSqlDriver extends core_1.DatabaseDriver {
|
|
|
709
711
|
joinedProps(meta, populate) {
|
|
710
712
|
return populate.filter(p => {
|
|
711
713
|
const prop = meta.properties[p.field] || {};
|
|
712
|
-
return (p.strategy || prop.strategy || this.config.get('loadStrategy')) === core_1.LoadStrategy.JOINED &&
|
|
714
|
+
return (p.strategy || prop.strategy || this.config.get('loadStrategy')) === core_1.LoadStrategy.JOINED && ![core_1.ReferenceKind.SCALAR, core_1.ReferenceKind.EMBEDDED].includes(prop.kind);
|
|
713
715
|
});
|
|
714
716
|
}
|
|
715
717
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/knex",
|
|
3
|
-
"version": "6.0.0-dev.
|
|
3
|
+
"version": "6.0.0-dev.126",
|
|
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",
|
|
@@ -63,9 +63,9 @@
|
|
|
63
63
|
"sqlstring": "2.3.3"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
|
-
"@mikro-orm/core": "^5.9.
|
|
66
|
+
"@mikro-orm/core": "^5.9.2"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
|
-
"@mikro-orm/core": "6.0.0-dev.
|
|
69
|
+
"@mikro-orm/core": "6.0.0-dev.126"
|
|
70
70
|
}
|
|
71
71
|
}
|