Skip to content

Fix mapping custom field names in downstream stages in TypedAggregation pipelines #4459

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 3 commits into from

Conversation

sxhinzvc
Copy link
Contributor

This PR uses the root AggregationOperationContext in nested ExposedFieldsAggregationOperationContext to properly apply mapping for domain properties that use @field.

Closes #4443

@sxhinzvc sxhinzvc requested a review from christophstrobl July 26, 2023 13:35
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jul 26, 2023
sxhinzvc and others added 2 commits July 27, 2023 10:08
…on pipelines.

Use the root AggregationOperationContext in nested ExposedFieldsAggregationOperationContext to properly apply mapping for domain properties that use @field.

Closes #4443
Use previous context instead of root for mapping objects within an Inheriting context. This avoids accidental mapping of fields against the root entity after eg. a projection stage.
Add missing tests for AggregationOperationRenderer to ensure intended context propagation.

Original Pull Request: #4459
@sxhinzvc sxhinzvc marked this pull request as ready for review July 27, 2023 17:44
christophstrobl pushed a commit that referenced this pull request Jul 28, 2023
…on pipelines.

Use the root AggregationOperationContext in nested ExposedFieldsAggregationOperationContext to properly apply mapping for domain properties that use @field.

Closes #4443
Original Pull Request: #4459
christophstrobl added a commit that referenced this pull request Jul 28, 2023
Use previous context instead of root for mapping objects within an Inheriting context. This avoids accidental mapping of fields against the root entity after eg. a projection stage.
Add missing tests for AggregationOperationRenderer to ensure intended context propagation.

Original Pull Request: #4459
christophstrobl pushed a commit that referenced this pull request Jul 28, 2023
…on pipelines.

Use the root AggregationOperationContext in nested ExposedFieldsAggregationOperationContext to properly apply mapping for domain properties that use @field.

Closes #4443
Original Pull Request: #4459
christophstrobl added a commit that referenced this pull request Jul 28, 2023
Use previous context instead of root for mapping objects within an Inheriting context. This avoids accidental mapping of fields against the root entity after eg. a projection stage.
Add missing tests for AggregationOperationRenderer to ensure intended context propagation.

Original Pull Request: #4459
christophstrobl pushed a commit that referenced this pull request Jul 28, 2023
…on pipelines.

Use the root AggregationOperationContext in nested ExposedFieldsAggregationOperationContext to properly apply mapping for domain properties that use @field.

Closes #4443
Original Pull Request: #4459
christophstrobl added a commit that referenced this pull request Jul 28, 2023
Use previous context instead of root for mapping objects within an Inheriting context. This avoids accidental mapping of fields against the root entity after eg. a projection stage.
Add missing tests for AggregationOperationRenderer to ensure intended context propagation.

Original Pull Request: #4459
christophstrobl pushed a commit that referenced this pull request Jul 28, 2023
…on pipelines.

Use the root AggregationOperationContext in nested ExposedFieldsAggregationOperationContext to properly apply mapping for domain properties that use @field.

Closes #4443
Original Pull Request: #4459
christophstrobl added a commit that referenced this pull request Jul 28, 2023
Use previous context instead of root for mapping objects within an Inheriting context. This avoids accidental mapping of fields against the root entity after eg. a projection stage.
Add missing tests for AggregationOperationRenderer to ensure intended context propagation.

Original Pull Request: #4459
@christophstrobl christophstrobl deleted the issue/4443 branch July 28, 2023 06:49
sxhinzvc added a commit that referenced this pull request Aug 1, 2023
sxhinzvc added a commit that referenced this pull request Aug 1, 2023
According to Mockito docs, when using Mockito versions <=5.0.0, mocking final types must be activated explicitly using a org.mockito.plugins.MockMaker file.

Original Pull Request: #4459
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage An issue we've not yet triaged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

@Field annotation not honoured after $unwind stage in aggregation
3 participants