Skip to content

Use relaxed type mapping for aggregations by default. #3545

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

christophstrobl
Copy link
Member

Switch from a strict to a relaxed type mapping for aggregation executions.
This allows users to add fields to the Aggregation that might be part of the stored document but not necessarily of its java model representation.
Instead of throwing an Exception the relaxed type check will go on with the user provided field names.
To restore the original behaviour use the strictMapping option on AggregationOptions.

This commit switches from a strict to a relaxed type mapping for aggregation executions. This allows users to add fields to the aggregation that might be part of the stored document but not necessarily of its java model representation.
Instead of throwing an exception in those cases the relaxed type check will go on with the user provided field names.
To restore the original behaviour use the strictMapping() option on AggregationOptions.

Closes #3542
@christophstrobl christophstrobl linked an issue Jan 25, 2021 that may be closed by this pull request
@mp911de mp911de added this to the 3.2 M3 (2021.0.0) milestone Jan 27, 2021
mp911de pushed a commit that referenced this pull request Jan 27, 2021
This commit switches from a strict to a relaxed type mapping for aggregation executions. This allows users to add fields to the aggregation that might be part of the stored document but not necessarily of its java model representation.
Instead of throwing an exception in those cases the relaxed type check will go on with the user provided field names.
To restore the original behaviour use the strictMapping() option on AggregationOptions.

Closes #3542
Original pull request: #3545.
mp911de added a commit that referenced this pull request Jan 27, 2021
Tweak wording in the docs. Remove unused code. Fix generics. Rename AggregateContext to AggregationOperation to AggregationDefinition to avoid yet another Context object.

See #3542.
Original pull request: #3545.
@mp911de
Copy link
Member

mp911de commented Jan 27, 2021

That's merged and polished now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Relax field name checks for TypedAggregations.
2 participants