@wxn0brp/db-core 0.2.4 → 0.2.5
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/dist/helpers/relation.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/helpers/relation.js
CHANGED
|
@@ -111,7 +111,7 @@ async function processRelations(dbs, cfg, data, parentList = null) {
|
|
|
111
111
|
const pivotDb = dbs[through.db || dbKey];
|
|
112
112
|
const pivots = await pivotDb.find(through.table, { [through.pk]: item[pk] });
|
|
113
113
|
const ids = pivots.map(p => p[through.fk]);
|
|
114
|
-
const related = await db.find(coll, { $in: { [fk]: ids } }, {}, {
|
|
114
|
+
const related = await db.find(coll, { $in: { [fk]: ids } }, {}, { select });
|
|
115
115
|
item[as] = related;
|
|
116
116
|
if (rel.relations) {
|
|
117
117
|
await Promise.all(related.map(row => processRelations(dbs, rel.relations, row)));
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = "0.2.
|
|
1
|
+
export const version = "0.2.5";
|