-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix expression defining entire query in annotated repository methods #3907
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
Conversation
…s computed entirely via expression. This commit makes sure the extension collector returns a marker object to indicate no further json parsing is required.
This fix enables defining an entire JSON-based query in Query and Aggregate annotations using a single parameter or SpEL Expression.
Replace calls to deprecated methods. Remove unsed variables. Optimize imports.
I just found the related issue #3874 fixed by @christophstrobl. My fix adds immediate expression result parsing as |
Hello @christophstrobl, I just merged your pull request, please take a look when you can. Thanks |
Thank you @rolag-it! We'll have a look (might take some time due to the upcoming holiday season though). |
...odb/src/main/java/org/springframework/data/mongodb/util/json/ParameterBindingJsonReader.java
Outdated
Show resolved
Hide resolved
Changed condition for Document parsing only when expression return a String
thanks @rolag-it! |
Add tests and move json string treatment into the ParameterBindingDocumentCodec. Finally add issue references and format code. Original Pull Request: #3907
Merged to main development line via (a8a0fb5). |
This fix enables defining an entire JSON-based query in
@Query
and@Aggregate
annotations use a single parameter or SpEL Expression.Examples: