@mikro-orm/knex 6.2.8-dev.1 → 6.2.8-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/AbstractSqlDriver.js +0 -9
- package/package.json +2 -2
package/AbstractSqlDriver.js
CHANGED
|
@@ -749,19 +749,13 @@ class AbstractSqlDriver extends core_1.DatabaseDriver {
|
|
|
749
749
|
if (owners.length === 1 && (options.offset != null || options.limit != null)) {
|
|
750
750
|
qb.limit(options.limit, options.offset);
|
|
751
751
|
}
|
|
752
|
-
// console.log('pivot qb', qb, qb._fields);
|
|
753
752
|
const res = owners.length ? await this.rethrow(qb.execute('all', { mergeResults: false, mapResults: false })) : [];
|
|
754
|
-
// console.log(res);
|
|
755
|
-
// const items = res.map((row: Dictionary) => super.mapResult(row, prop.targetMeta));
|
|
756
753
|
const tmp = {};
|
|
757
|
-
// const items = res.map((row: Dictionary) => this.mapResult(row, prop.targetMeta!, populate, qb, tmp));
|
|
758
|
-
// const items = res.map((row: Dictionary) => this.mapResult(row, pivotMeta, populate, qb, tmp));
|
|
759
754
|
const items = res.map((row) => {
|
|
760
755
|
const root = super.mapResult(row, prop.targetMeta);
|
|
761
756
|
this.mapJoinedProps(root, prop.targetMeta, populate, qb, root, tmp, pivotMeta.className + '.' + pivotProp1.name);
|
|
762
757
|
return root;
|
|
763
758
|
});
|
|
764
|
-
// console.log(prop.name, prop.targetMeta!.className, items);
|
|
765
759
|
qb.clearRawFragmentsCache();
|
|
766
760
|
const map = {};
|
|
767
761
|
const pkProps = ownerMeta.getPrimaryProps();
|
|
@@ -898,7 +892,6 @@ class AbstractSqlDriver extends core_1.DatabaseDriver {
|
|
|
898
892
|
const prop = meta.properties[propName];
|
|
899
893
|
// ignore ref joins of known FKs unless it's a filter hint
|
|
900
894
|
if (ref && !hint.filter && (prop.kind === core_1.ReferenceKind.MANY_TO_ONE || (prop.kind === core_1.ReferenceKind.ONE_TO_ONE && !prop.owner))) {
|
|
901
|
-
// // console.log('wat', hint);
|
|
902
895
|
return;
|
|
903
896
|
}
|
|
904
897
|
const meta2 = this.metadata.find(prop.type);
|
|
@@ -932,11 +925,9 @@ class AbstractSqlDriver extends core_1.DatabaseDriver {
|
|
|
932
925
|
fields.push(...this.getFieldsForJoinedLoad(qb, meta2, childExplicitFields.length === 0 ? undefined : childExplicitFields, childExclude, hint.children, options, tableAlias, path));
|
|
933
926
|
}
|
|
934
927
|
else if (hint.filter) {
|
|
935
|
-
// fields.push(field);
|
|
936
928
|
fields.push(...prop.referencedColumnNames.map(col => qb.helper.mapper(`${tableAlias}.${col}`, qb.type, undefined, `${tableAlias}__${col}`)));
|
|
937
929
|
}
|
|
938
930
|
});
|
|
939
|
-
// // console.log(fields, joinedProps);
|
|
940
931
|
return fields;
|
|
941
932
|
}
|
|
942
933
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/knex",
|
|
3
|
-
"version": "6.2.8-dev.
|
|
3
|
+
"version": "6.2.8-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,6 +66,6 @@
|
|
|
66
66
|
"@mikro-orm/core": "^6.2.7"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
|
-
"@mikro-orm/core": "6.2.8-dev.
|
|
69
|
+
"@mikro-orm/core": "6.2.8-dev.3"
|
|
70
70
|
}
|
|
71
71
|
}
|