@mikro-orm/knex 6.4.17-dev.18 → 6.4.17-dev.19
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 +13 -10
- package/package.json +2 -2
package/AbstractSqlDriver.js
CHANGED
|
@@ -1311,16 +1311,19 @@ class AbstractSqlDriver extends core_1.DatabaseDriver {
|
|
|
1311
1311
|
ret.push('*');
|
|
1312
1312
|
}
|
|
1313
1313
|
if (ret.length > 0 && !hasExplicitFields && addFormulas) {
|
|
1314
|
-
meta.props
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1314
|
+
for (const prop of meta.props) {
|
|
1315
|
+
if (lazyProps.includes(prop)) {
|
|
1316
|
+
continue;
|
|
1317
|
+
}
|
|
1318
|
+
if (prop.formula) {
|
|
1319
|
+
const a = this.platform.quoteIdentifier(alias);
|
|
1320
|
+
const aliased = this.platform.quoteIdentifier(prop.fieldNames[0]);
|
|
1321
|
+
ret.push((0, core_1.raw)(`${prop.formula(a)} as ${aliased}`));
|
|
1322
|
+
}
|
|
1323
|
+
if (!prop.object && (prop.hasConvertToDatabaseValueSQL || prop.hasConvertToJSValueSQL)) {
|
|
1324
|
+
ret.push(prop.name);
|
|
1325
|
+
}
|
|
1326
|
+
}
|
|
1324
1327
|
}
|
|
1325
1328
|
// add joined relations after the root entity fields
|
|
1326
1329
|
if (joinedProps.length > 0) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/knex",
|
|
3
|
-
"version": "6.4.17-dev.
|
|
3
|
+
"version": "6.4.17-dev.19",
|
|
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.4.16"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
|
-
"@mikro-orm/core": "6.4.17-dev.
|
|
69
|
+
"@mikro-orm/core": "6.4.17-dev.19",
|
|
70
70
|
"better-sqlite3": "*",
|
|
71
71
|
"libsql": "*",
|
|
72
72
|
"mariadb": "*"
|