@mikro-orm/knex 6.4.6-dev.1 → 6.4.6-dev.3
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.4.6-dev.
|
|
3
|
+
"version": "6.4.6-dev.3",
|
|
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.5"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
|
-
"@mikro-orm/core": "6.4.6-dev.
|
|
69
|
+
"@mikro-orm/core": "6.4.6-dev.3",
|
|
70
70
|
"better-sqlite3": "*",
|
|
71
71
|
"libsql": "*",
|
|
72
72
|
"mariadb": "*"
|
package/query/QueryBuilder.js
CHANGED
|
@@ -832,7 +832,7 @@ class QueryBuilder {
|
|
|
832
832
|
ref.as(aliasName);
|
|
833
833
|
}
|
|
834
834
|
const schema = this.getSchema(this.mainAlias);
|
|
835
|
-
if (schema) {
|
|
835
|
+
if (schema && schema !== this.platform.getDefaultSchemaName()) {
|
|
836
836
|
ref.withSchema(schema);
|
|
837
837
|
}
|
|
838
838
|
if (metadata?.virtual && processVirtualEntity) {
|
|
@@ -1053,7 +1053,7 @@ class QueryBuilder {
|
|
|
1053
1053
|
const schema = this.getSchema(this.mainAlias);
|
|
1054
1054
|
// Joined tables doesn't need to belong to the same schema as the main table
|
|
1055
1055
|
const joinSchema = this._schema ?? this.em?.schema ?? schema;
|
|
1056
|
-
if (schema) {
|
|
1056
|
+
if (schema && schema !== this.platform.getDefaultSchemaName()) {
|
|
1057
1057
|
qb.withSchema(schema);
|
|
1058
1058
|
}
|
|
1059
1059
|
if (this._indexHint) {
|
|
@@ -1372,7 +1372,7 @@ class QueryBuilder {
|
|
|
1372
1372
|
getSchema(alias) {
|
|
1373
1373
|
const { metadata } = alias;
|
|
1374
1374
|
const metaSchema = metadata?.schema && metadata.schema !== '*' ? metadata.schema : undefined;
|
|
1375
|
-
return this._schema ?? metaSchema ?? this.em?.schema ?? this.em?.config.
|
|
1375
|
+
return this._schema ?? metaSchema ?? this.em?.schema ?? this.em?.config.getSchema(true);
|
|
1376
1376
|
}
|
|
1377
1377
|
createAlias(entityName, aliasName, subQuery) {
|
|
1378
1378
|
const metadata = this.metadata.find(entityName);
|
|
@@ -206,7 +206,7 @@ class QueryBuilderHelper {
|
|
|
206
206
|
const conditions = [];
|
|
207
207
|
const params = [];
|
|
208
208
|
schema = join.schema && join.schema !== '*' ? join.schema : schema;
|
|
209
|
-
if (schema) {
|
|
209
|
+
if (schema && schema !== this.platform.getDefaultSchemaName()) {
|
|
210
210
|
table = `${schema}.${table}`;
|
|
211
211
|
}
|
|
212
212
|
if (join.prop.name !== '__subquery__') {
|