spring-data-mongodb
spring-data-mongodb copied to clipboard
DATAMONGO-3587 - Support Evaluation Query Operators $expr.
- [ ] You have read the Spring Data contribution guidelines.
- [ ] You use the code formatters provided here and have them applied to your changes. Don’t submit any formatting related changes.
- [ ] You submit test cases (unit or integration tests) that back your changes.
- [ ] You added yourself as author in the headers of the classes you touched. Amend the date range in the Apache license header if needed. For new types, add the license header (copy from another file and set the current year only).
Care to rebase your pull request? There are several commits that do not belong into this PR.
Hi Mark
The changes I made in MatchOperation were since I thought the now we can create a Criteria using the expression Criteria.expr(AggregationExpression) that can be passed to match operation existing constructor to create the match operation. So there is no need to explicitly add an expression field in the MatchOperation class for "$expr" operator( which I changed for issue#3790 ) since it can be done with criteria itself. So I made the changes. I have removed those and now only changes related to Criteria class are there.
Thanks
Accidently it got deleted. Please find the PR for this.
Thanks for taking the time to craft the PR and sorry for long radio silence. Unfortunately the expression gets evaluated right away without considering the context the query may be run in. This leads to invalid field references, because the QueryMapper considers values prefixed with $ keywords and will simply go over them.
I'll close this one in favor of #4316