c2-mongoose 2.1.54 → 2.1.55

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.
@@ -177,6 +177,9 @@ var SearchFlow = /** @class */ (function () {
177
177
  ]).session(options === null || options === void 0 ? void 0 : options.session)];
178
178
  case 1:
179
179
  result = _b.sent();
180
+ return [4 /*yield*/, model.populate(result[0].items, __assign(__assign({}, this.populate), { select: this.select }))];
181
+ case 2:
182
+ _b.sent();
180
183
  return [2 /*return*/, {
181
184
  items: result[0].items,
182
185
  paging: ((_a = result[0]) === null || _a === void 0 ? void 0 : _a.paging[0]) || { total: 0, page: 1, limit: this.limit }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c2-mongoose",
3
- "version": "2.1.54",
3
+ "version": "2.1.55",
4
4
  "description": "Lib to make any search in database mongoose and use as basic crud",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -103,6 +103,9 @@ abstract class SearchFlow {
103
103
  }
104
104
  ]
105
105
  ).session(options?.session as ClientSession)
106
+
107
+ await model.populate(result[0].items, { ...this.populate, select: this.select })
108
+
106
109
  return {
107
110
  items: result[0].items,
108
111
  paging: result[0]?.paging[0] || { total: 0, page: 1, limit: this.limit }