-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Spring Data Repository nested camel-case properties resolution fix #13312
Conversation
Thanks for your pull request! The title of your pull request does not follow our editorial rules. Could you have a look?
|
Thanks for this! I think we really need some tests covering the issues the PR addresses |
e9b9d1d
to
93be872
Compare
@geoand I added some unit tests (and found and fixed some issues). I think the coverage should be okay now. |
integration-tests/spring-data-jpa/src/main/java/io/quarkus/it/spring/data/jpa/Employee.java
Outdated
Show resolved
Hide resolved
Thanks a lot! I'll take a closer look tomorrow or Monday. |
93be872
to
2a3f633
Compare
2a3f633
to
73509a2
Compare
...ng-data-jpa/deployment/src/main/java/io/quarkus/spring/data/deployment/MethodNameParser.java
Outdated
Show resolved
Hide resolved
integration-tests/spring-data-jpa/src/main/resources/import.sql
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great work, thanks a lot!
I added a couple of tiny comments, can you please address them so we can then merge this?
73509a2
to
689aa25
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
689aa25
to
58bbe33
Compare
@geoand My branch fails but I don't see how the test failures are related to my changes. I saw that other pull requests seem to have similar problems. The branches run against an isolated repository, don't they? (Unfortunately maven does not support hash based build caches.) Do the builds share any other resources? |
They don't share anything. The failure is likely just a flake. If that is the case, I'll merge your PR anyway. I'll check on Monday. |
Can you please rebase onto the latest master in order to pick up the CI fix? |
…operties does not work with Quarkus
58bbe33
to
2873086
Compare
@geoand Thanks for helping fixing the CI! |
Don't thank me, thank @gsmet 😉 |
Thanks! @geoand is this something we want to backport to 1.10.1? If so, please add the label, thanks! |
Yeah, I guess we can |
Fix #13067.
I re-implemented the resolution of nested properties now they should be resolved as described here https://docs.spring.io/spring-data/jpa/docs/current/reference/html/#repositories.query-methods.query-property-expressions. I also widened the allowed types for the resolved properties to the types supported by JPA.
The property resolution is now done iteratively and tries to find the longest match (but at most to the next underscore because the underscore is treated as reserved character according to the Spring Data JPA documentation).