@mikro-orm/knex 5.7.15-dev.37 → 5.7.15-dev.38
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 +3 -2
- package/package.json +4 -4
package/AbstractSqlDriver.js
CHANGED
|
@@ -684,9 +684,10 @@ class AbstractSqlDriver extends core_1.DatabaseDriver {
|
|
|
684
684
|
if (!deleteDiff) {
|
|
685
685
|
deleteDiff = [];
|
|
686
686
|
}
|
|
687
|
+
const pivotMeta = this.metadata.find(prop.pivotEntity);
|
|
687
688
|
if (deleteDiff === true || deleteDiff.length > 0) {
|
|
688
689
|
const qb1 = this.createQueryBuilder(prop.pivotEntity, options?.ctx, 'write')
|
|
689
|
-
.withSchema(this.getSchemaName(
|
|
690
|
+
.withSchema(this.getSchemaName(pivotMeta, options))
|
|
690
691
|
.unsetFlag(core_1.QueryFlag.CONVERT_CUSTOM_TYPES);
|
|
691
692
|
const knex = qb1.getKnex();
|
|
692
693
|
if (Array.isArray(deleteDiff)) {
|
|
@@ -712,7 +713,7 @@ class AbstractSqlDriver extends core_1.DatabaseDriver {
|
|
|
712
713
|
await core_1.Utils.runSerial(items, item => {
|
|
713
714
|
return this.createQueryBuilder(prop.pivotEntity, options?.ctx, 'write')
|
|
714
715
|
.unsetFlag(core_1.QueryFlag.CONVERT_CUSTOM_TYPES)
|
|
715
|
-
.withSchema(this.getSchemaName(
|
|
716
|
+
.withSchema(this.getSchemaName(pivotMeta, options))
|
|
716
717
|
.insert(item)
|
|
717
718
|
.execute('run', false);
|
|
718
719
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/knex",
|
|
3
|
-
"version": "5.7.15-dev.
|
|
3
|
+
"version": "5.7.15-dev.38",
|
|
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,9 +66,9 @@
|
|
|
66
66
|
"@mikro-orm/core": "^5.7.14"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
|
-
"@mikro-orm/core": "~5.7.15-dev.
|
|
70
|
-
"@mikro-orm/entity-generator": "~5.7.15-dev.
|
|
71
|
-
"@mikro-orm/migrations": "~5.7.15-dev.
|
|
69
|
+
"@mikro-orm/core": "~5.7.15-dev.38",
|
|
70
|
+
"@mikro-orm/entity-generator": "~5.7.15-dev.38",
|
|
71
|
+
"@mikro-orm/migrations": "~5.7.15-dev.38",
|
|
72
72
|
"better-sqlite3": "*",
|
|
73
73
|
"mssql": "*",
|
|
74
74
|
"mysql": "*",
|