You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This, however, doesn't work with AggregationOptions.strictMapping(), since Variable.VALUE and Variable.THIS are converted into $$value and $$this correspondingly, and document obviously doesn't have these fields.
This aggregation works without strict mapping, since in this case the variable names are passed into the document as-is. However, this is merely masking the problem.
It's possible that I was just incorrectly using the variables. In this case, it's probably better to have the documentation changed, since currently it seems that the only references to them are in documentation for ReduceBuilder.Reduce.
The text was updated successfully, but these errors were encountered:
mp911de
changed the title
Reduce aggregation operation doesn't allow using Variable.VALUE and Variable.THIS with strict mapping
Reduce aggregation operation doesn't allow using Variable.VALUE and Variable.THIS with strict mapping
Jan 12, 2023
This commit introduces a new AggregationVariable type that is intended to better identify variables within a pipeline to avoid mapping failures caused by invalid field names.
Closes#4070
Original pull request: #4242
I've attempted to execute the following aggregation operation:
where the original structure is like this:
This, if I'm not mistaken, should correspond to the following Spring code:
This, however, doesn't work with
AggregationOptions.strictMapping()
, sinceVariable.VALUE
andVariable.THIS
are converted into$$value
and$$this
correspondingly, and document obviously doesn't have these fields.This aggregation works without strict mapping, since in this case the variable names are passed into the document as-is. However, this is merely masking the problem.
It's possible that I was just incorrectly using the variables. In this case, it's probably better to have the documentation changed, since currently it seems that the only references to them are in documentation for
ReduceBuilder.Reduce
.The text was updated successfully, but these errors were encountered: