c2-mongoose 2.1.296 → 2.1.297

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.
@@ -331,7 +331,7 @@ var SearcherFlow = /** @class */ (function () {
331
331
  ].includes(key)) {
332
332
  return;
333
333
  }
334
- if (typeof value === 'string' && _this.isValidObjectId(value) && key !== 'owner') {
334
+ if (typeof value === 'string' && _this.isValidObjectId(value) && key !== 'owner' && key !== 'identifier') {
335
335
  value = new mongoose_1.Types.ObjectId(value);
336
336
  }
337
337
  if (value === 'true') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c2-mongoose",
3
- "version": "2.1.296",
3
+ "version": "2.1.297",
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",
@@ -251,8 +251,7 @@ class SearcherFlow<D> {
251
251
  if (key.startsWith("notIn")) {
252
252
  key = key.replace("notIn", "");
253
253
  condition[key] = { $nin: value };
254
- }
255
- else {
254
+ } else {
256
255
  condition[key] = { $in: value };
257
256
  }
258
257
  } else if (Array.isArray(value)) {
@@ -311,7 +310,7 @@ class SearcherFlow<D> {
311
310
  return
312
311
  }
313
312
 
314
- if (typeof value === 'string' && this.isValidObjectId(value as string) && key !== 'owner') {
313
+ if (typeof value === 'string' && this.isValidObjectId(value as string) && key !== 'owner' && key !== 'identifier') {
315
314
  value = new Types.ObjectId(value as string)
316
315
  }
317
316