-
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
Fix #5885: generics break panache repo enhancer #6191
Conversation
Do not enhance generic/abstract repos Use proper generics resolution when looking up the repository type arguments
@loicmathieu it's very possible you have the same bug in mongo-panache, and will need the same fix (do not enhance abstract/generic repos). It's also possible that you have the same issue in your reactive-mongo-panache repo IF your entity base type is generic. |
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.
👍
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.
mongodb-panache
and the future mongodb-panache-reactive
suffers from the same bug.
If you don't have time to fix it in mongodb-panache
inside the same PR, can you open an issue for it ?
...ment/src/main/java/io/quarkus/hibernate/orm/panache/deployment/PanacheResourceProcessor.java
Outdated
Show resolved
Hide resolved
...deployment/src/main/java/io/quarkus/panache/common/deployment/PanacheRepositoryEnhancer.java
Show resolved
Hide resolved
I can do it in this PR, should be simple. |
Added test/fix for mongo too. |
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.
LGTM
Huh, so native test fails, due to who knows what, but I am already rebased on master. |
It passed after restart |
@FroMage Here we have the problem, that a Repository listAll() call gives us every DataBase entry in every table. Kotlin
Is it a different bug which needs to get reported in a new issue ticket? |
@MartinX3 is this with the current master which has the fix? I think it's the same bug and it should be fixed. |
@FroMage Thank you for your fast response. Thank you all for the fix. :) |
That's a question for @gsmet but IIRC 1.2 is planned for January. |
Do not enhance generic/abstract repos
Use proper generics resolution when looking up the repository type
arguments
Fixes: #5885