@mikro-orm/knex 6.5.9-dev.6 → 6.5.9-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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/knex",
|
|
3
|
-
"version": "6.5.9-dev.
|
|
3
|
+
"version": "6.5.9-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,7 +66,7 @@
|
|
|
66
66
|
"@mikro-orm/core": "^6.5.8"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
|
-
"@mikro-orm/core": "6.5.9-dev.
|
|
69
|
+
"@mikro-orm/core": "6.5.9-dev.8",
|
|
70
70
|
"better-sqlite3": "*",
|
|
71
71
|
"libsql": "*",
|
|
72
72
|
"mariadb": "*"
|
|
@@ -79,7 +79,7 @@ class QueryBuilderHelper {
|
|
|
79
79
|
if (prop?.name === a && prop.embeddedProps[f]) {
|
|
80
80
|
return this.alias + '.' + prop.fieldNames[fkIdx];
|
|
81
81
|
}
|
|
82
|
-
const noPrefix = prop
|
|
82
|
+
const noPrefix = prop?.persist === false;
|
|
83
83
|
if (prop?.fieldNameRaw) {
|
|
84
84
|
return this.knex.raw(this.prefix(field, isTableNameAliasRequired));
|
|
85
85
|
}
|
|
@@ -557,7 +557,7 @@ class QueryBuilderHelper {
|
|
|
557
557
|
let [alias, field] = this.splitField(f, true);
|
|
558
558
|
alias = populate[alias] || alias;
|
|
559
559
|
const prop = this.getProperty(field, alias);
|
|
560
|
-
const noPrefix = (prop
|
|
560
|
+
const noPrefix = (prop?.persist === false && !prop.formula && !prop.embedded) || core_1.RawQueryFragment.isKnownFragment(f);
|
|
561
561
|
const column = this.mapper(noPrefix ? field : `${alias}.${field}`, type, undefined, null);
|
|
562
562
|
/* istanbul ignore next */
|
|
563
563
|
const rawColumn = core_1.Utils.isString(column) ? column.split('.').map(e => this.knex.ref(e)).join('.') : column;
|