elseware-nodejs 1.8.4 → 1.8.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/index.cjs +9 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -5194,6 +5194,15 @@ var BaseMongoRepository = class {
|
|
|
5194
5194
|
if (options.sort) query = query.sort(options.sort);
|
|
5195
5195
|
if (options.limit) query = query.limit(options.limit);
|
|
5196
5196
|
if (options.skip) query = query.skip(options.skip);
|
|
5197
|
+
if (options.populate) {
|
|
5198
|
+
if (Array.isArray(options.populate)) {
|
|
5199
|
+
options.populate.forEach((p) => {
|
|
5200
|
+
query = query.populate(p);
|
|
5201
|
+
});
|
|
5202
|
+
} else {
|
|
5203
|
+
query = query.populate(options.populate);
|
|
5204
|
+
}
|
|
5205
|
+
}
|
|
5197
5206
|
return query;
|
|
5198
5207
|
}
|
|
5199
5208
|
toPlain(doc) {
|