@optimiser/common 1.0.278 → 1.0.279
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.
- package/dist/lib/utility.js +9 -9
- package/package.json +1 -1
package/dist/lib/utility.js
CHANGED
|
@@ -1779,7 +1779,9 @@ function BuildGridFieldProjection(project, field, group) {
|
|
|
1779
1779
|
if (field.Schema.ExcludeLookupFieldsOnSearch && field.Schema.ExcludeLookupFieldsOnSearch.filter(function (x) { return x == field.Schema.LookupFields[i]; }).length != 0) {
|
|
1780
1780
|
return "continue";
|
|
1781
1781
|
}
|
|
1782
|
-
searchConcatArry.push({ "$ifNull": ['$' + alias + '.' + field.Schema.LookupFields[i], ""] });
|
|
1782
|
+
// searchConcatArry.push({ "$ifNull": ['$' + alias + '.' + field.Schema.LookupFields[i], ""] });
|
|
1783
|
+
// added by Shahzaib, make int to string and concat
|
|
1784
|
+
searchConcatArry.push({ "$ifNull": [{ $toString: '$' + alias + '.' + field.Schema.LookupFields[i] }, ""] });
|
|
1783
1785
|
if (i < field.Schema.LookupFields.length - 1) {
|
|
1784
1786
|
searchConcatArry.push(" ");
|
|
1785
1787
|
}
|
|
@@ -1795,9 +1797,9 @@ function BuildGridFieldProjection(project, field, group) {
|
|
|
1795
1797
|
project[fldName] = 1;
|
|
1796
1798
|
project[alias] = 1;
|
|
1797
1799
|
for (var i = 0; i < field.Schema.LookupFields.length; i++) {
|
|
1798
|
-
searchConcatArry.push({
|
|
1799
|
-
|
|
1800
|
-
});
|
|
1800
|
+
// searchConcatArry.push({ "$ifNull": ['$' + alias + '.' + field.Schema.LookupFields[i], [" "]] });
|
|
1801
|
+
// added by Shahzaib, make int to string and concat
|
|
1802
|
+
searchConcatArry.push({ "$ifNull": [{ $toString: '$' + alias + '.' + field.Schema.LookupFields[i] }, ""] });
|
|
1801
1803
|
if (i < field.Schema.LookupFields.length - 1) {
|
|
1802
1804
|
searchConcatArry.push([" "]);
|
|
1803
1805
|
}
|
|
@@ -1838,11 +1840,9 @@ function BuildGridFieldProjection(project, field, group) {
|
|
|
1838
1840
|
project[alias] = 1;
|
|
1839
1841
|
if (field.Schema.LookupObject) {
|
|
1840
1842
|
for (var i = 0; i < field.Schema.LookupFields.length; i++) {
|
|
1841
|
-
searchConcatArry.push({
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
]
|
|
1845
|
-
});
|
|
1843
|
+
// searchConcatArry.push({ "$ifNull": ['$' + alias + '.' + field.Schema.LookupFields[i], [" "] ] });
|
|
1844
|
+
// added by Shahzaib, make int to string and concat
|
|
1845
|
+
searchConcatArry.push({ "$ifNull": [{ $toString: '$' + alias + '.' + field.Schema.LookupFields[i] }, [" "]] });
|
|
1846
1846
|
if (i < field.Schema.LookupFields.length - 1) {
|
|
1847
1847
|
searchConcatArry.push([" "]);
|
|
1848
1848
|
}
|