c2-mongoose 2.1.301 → 2.1.302
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.
|
@@ -279,7 +279,7 @@ var SearcherFlow = /** @class */ (function () {
|
|
|
279
279
|
}
|
|
280
280
|
else if (key.endsWith("IsEmpty")) {
|
|
281
281
|
key = key.replace("IsEmpty", "");
|
|
282
|
-
condition[key] = { $size: 0 };
|
|
282
|
+
condition[key] = { $size: value ? 0 : { $gte: 1 } };
|
|
283
283
|
}
|
|
284
284
|
else {
|
|
285
285
|
condition[key] = { $in: value };
|
package/package.json
CHANGED
package/src/flow/SearcherFlow.ts
CHANGED
|
@@ -256,7 +256,7 @@ class SearcherFlow<D> {
|
|
|
256
256
|
condition[key] = { $nin: value };
|
|
257
257
|
} else if (key.endsWith("IsEmpty")) {
|
|
258
258
|
key = key.replace("IsEmpty", "");
|
|
259
|
-
condition[key] = { $size: 0 };
|
|
259
|
+
condition[key] = { $size: value ? 0 : { $gte: 1 } };
|
|
260
260
|
} else {
|
|
261
261
|
condition[key] = { $in: value };
|
|
262
262
|
}
|