c2-mongoose 2.1.147 → 2.1.148

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.
@@ -476,7 +476,12 @@ var SearchFlow = /** @class */ (function () {
476
476
  }
477
477
  arr.push(val);
478
478
  }
479
- condition[key] = { $in: arr };
479
+ if (key.startsWith("notIn")) {
480
+ condition[key] = { $nin: arr };
481
+ }
482
+ else {
483
+ condition[key] = { $in: arr };
484
+ }
480
485
  }
481
486
  filters.$and.push(condition);
482
487
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c2-mongoose",
3
- "version": "2.1.147",
3
+ "version": "2.1.148",
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",
@@ -428,7 +428,12 @@ abstract class SearchFlow {
428
428
  arr.push(val)
429
429
  }
430
430
 
431
- condition[key] = { $in: arr }
431
+ if (key.startsWith("notIn")) {
432
+ condition[key] = { $nin: arr }
433
+ }else{
434
+ condition[key] = { $in: arr }
435
+ }
436
+
432
437
  }
433
438
  filters.$and.push(condition)
434
439
  }