-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Spring Data API Extension query with field named like the class broken #48032
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
Comments
/cc @aureamunoz (spring), @geoand (spring) |
Hello @Michael-AT-Corporation, I've just resolved the issue. However, is there a real-world scenario where this would occur in a typical Quarkus project? It seems like you may have created a separate application to reproduce the problem. I'm ready to submit a PR if needed. Also, this link : https://github.com/quarkusio/quarkus/issues/44026 that you've shared in the description led me to an empty page, could you please check ? Regards, |
Hello @yberbec, thanks for looking into this issue.
I replaced the link. It should work now. I don't think there are many scenarios where this problem occurs. In my project I have an Entity named Language which has an enum (also named Language) as field named language as well. I would be happy if you could submit your pull request. |
Hello @Michael-AT-Corporation, Should I submit your project QuarkusJpaTestFieldName as a zip file with the fix I did ? because what I asked for is to have this one scenario you have in Quarkus project, so I can create a PR. Thanks |
@yberbec Yes please submit QuarkusJpaTestFieldName . Thanks |
Here it is : By using the |
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
Having a Repository with
List<Parent> findByParent(String parent);
causes the following exception at runtime when calling it:This happens because the name of the field in the class is the same as the class. In this Example the field
parent
in the classParent
.This happens since 3.18.0.CR1. Maybe because of this change: #44026
Expected behavior
No exception.
Actual behavior
Throws an exception when calling the method.
How to Reproduce?
QuarkusJpaTestFieldName.zip
Start the test
getParent
ormvn test
.This should cause the following exception:
Output of
uname -a
orver
No response
Output of
java -version
No response
Quarkus version or git rev
3.22.3
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
The text was updated successfully, but these errors were encountered: