c2-mongoose 2.1.409 → 2.1.410
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.
|
@@ -22,7 +22,7 @@ var BuildConditionSearchTextFlowItem = /** @class */ (function () {
|
|
|
22
22
|
var conditionAux_1 = {};
|
|
23
23
|
conditionAux_1["$expr"] = {
|
|
24
24
|
"$regexMatch": {
|
|
25
|
-
input: { $toString: "$
|
|
25
|
+
input: { $toString: "$".concat(fieldString) },
|
|
26
26
|
regex: filters.searchText,
|
|
27
27
|
options: "i" // (opcional) case insensitive
|
|
28
28
|
}
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@ class BuildConditionSearchTextFlowItem {
|
|
|
18
18
|
let conditionAux: { [key: string]: any } = {}
|
|
19
19
|
conditionAux["$expr"] = {
|
|
20
20
|
"$regexMatch": {
|
|
21
|
-
input: { $toString:
|
|
21
|
+
input: { $toString: `$${fieldString}` }, // converte ObjectId -> string
|
|
22
22
|
regex: filters.searchText, // substring a procurar
|
|
23
23
|
options: "i" // (opcional) case insensitive
|
|
24
24
|
}
|