Hi all,
I have a tricky use case.
I have written two aggregations:
AGGREGATION 1
var runDataList = _runCollection
.Aggregate()
.Match(filter)
.Lookup(
_clxCollection,
m => m.RunDefinition,
c => c.RunDefinition,
(RunDataFull m) => m.ClxParameterList
)
.ToList();
In this aggregation the $lookup stages creates 1 key: ClxParameterList
AGGREGATION 2
var clxList = _clxCollection
.Aggregate()
.Match(filter)
.Lookup(
_clxCollection,
m => m.BaseClxName,
c => c.Name,
(BikeClxParametersFull m) => m.BaseParamaterValues
)
.ToList();
In this aggregation the $lookup stage creates one key: BaseParamaterValues
This is ok, but I would like to mix them: basically I would like that the BaseParamaterValues key appears in the first aggregation; something like ClxParameterList.BaseParamaterValues
It is like if in the first aggregaton I replace _bikeClxParameterCollection with the output of the second aggregation (clxList) - I cannot do this becase the $lookup parameters must be collections, not aggregation results.
Has anyone any suggestion? I am using the C# driver.