Skip to content

Support aggregation expression on fields projection. #3583

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
christophstrobl opened this issue Mar 9, 2021 · 0 comments
Closed

Support aggregation expression on fields projection. #3583

christophstrobl opened this issue Mar 9, 2021 · 0 comments
Assignees
Labels
type: enhancement A general enhancement

Comments

@christophstrobl
Copy link
Member

MongoDB allows using aggregation expressions as part of the fields projection as shown below.

db.getCollection('person').find({}, { "firstname" : 1, "lastname" : {"$toUpper" : "$lastname"}})

Initial Support:

  • Pass on a given expression projection to the server as is.
  • The query.fields object should be able to accept an expression eg. by using a BasicQuery.
  • The @Query annotation should parse the fields attribute holding an expression.

Final Support: (might require a follow up ticket)

  • Map expressions against domain types.
  • Support AggregationExpression via Field projection API.
@christophstrobl christophstrobl added the type: enhancement A general enhancement label Mar 9, 2021
@christophstrobl christophstrobl self-assigned this Mar 9, 2021
mp911de added a commit that referenced this issue Mar 18, 2021
Reorder methods. Tweak Javadoc and documentation wording. Mention projection expressions in the what's new section. Reformat code.

See #3583
Original pull request: #3585.
@mp911de mp911de added this to the 3.2 RC1 (2021.0.0) milestone Mar 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants