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.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -5179,6 +5179,15 @@ var BaseMongoRepository = class {
|
|
|
5179
5179
|
if (options.sort) query = query.sort(options.sort);
|
|
5180
5180
|
if (options.limit) query = query.limit(options.limit);
|
|
5181
5181
|
if (options.skip) query = query.skip(options.skip);
|
|
5182
|
+
if (options.populate) {
|
|
5183
|
+
if (Array.isArray(options.populate)) {
|
|
5184
|
+
options.populate.forEach((p) => {
|
|
5185
|
+
query = query.populate(p);
|
|
5186
|
+
});
|
|
5187
|
+
} else {
|
|
5188
|
+
query = query.populate(options.populate);
|
|
5189
|
+
}
|
|
5190
|
+
}
|
|
5182
5191
|
return query;
|
|
5183
5192
|
}
|
|
5184
5193
|
toPlain(doc) {
|