@andrewscwei/mongodb-odm
Advanced tools
Comparing version 0.49.0 to 0.50.0
@@ -220,3 +220,3 @@ "use strict"; | ||
const collection = yield this.getCollection(); | ||
const results = yield collection.aggregate(this.pipeline(query).concat([{ $sample: { size: 1 } }])).toArray(); | ||
const results = yield collection.aggregate(this.pipeline().concat([{ $sample: { size: 1 } }])).toArray(); | ||
if (results.length !== 1) | ||
@@ -223,0 +223,0 @@ throw new Error(`[${this.schema.model}] More or less than 1 random document found even though only 1 was supposed to be found.`); |
{ | ||
"name": "@andrewscwei/mongodb-odm", | ||
"version": "0.49.0", | ||
"version": "0.50.0", | ||
"description": "ODM for MongoDB", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
211007