@resolveio/server-lib 4.5.7 → 4.5.8
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.
|
@@ -582,8 +582,8 @@ function loadReportBuilderMethods(methodManager) {
|
|
|
582
582
|
proj_1.$addFields['rb_arrays_' + cnt + '_' + field.id].$filter.cond.$and.push({ $or: tmpOr_2 });
|
|
583
583
|
}
|
|
584
584
|
}
|
|
585
|
-
zipLayers.push(proj_1);
|
|
586
585
|
});
|
|
586
|
+
zipLayers.push(proj_1);
|
|
587
587
|
proj_1 = { $addFields: {} };
|
|
588
588
|
selectedFields.filter(function (a) { return a.fieldPath.split('.$').length === cnt + 2; }).forEach(function (field) {
|
|
589
589
|
proj_1.$addFields['rb_arrays_' + cnt + '_' + field.id] = '$rb_arrays_' + cnt + '_' + field.id + field.fieldPath.split('.$')[cnt];
|
|
@@ -879,12 +879,14 @@ function loadReportBuilderMethods(methodManager) {
|
|
|
879
879
|
if (initialNonSumValueProj) {
|
|
880
880
|
query.push(initialNonSumValueProj);
|
|
881
881
|
}
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
882
|
+
if (selectedFields.some(function (a) { return a.fieldPath.split('.$').length > 2; })) {
|
|
883
|
+
query.push({
|
|
884
|
+
$unwind: {
|
|
885
|
+
"path": "$rb_arrays_0",
|
|
886
|
+
"preserveNullAndEmptyArrays": true
|
|
887
|
+
}
|
|
888
|
+
});
|
|
889
|
+
}
|
|
888
890
|
for (i = 0; i < zipLayers.length; i++) {
|
|
889
891
|
query.push(zipLayers[i]);
|
|
890
892
|
}
|