-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Refactor how ORM with Panache generates bridge methods #2818
Conversation
…dge` to non-rx panache
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.
Otherwise seems OK though I really don't know what is happening here in detail :)
...ment/src/main/java/io/quarkus/hibernate/orm/panache/deployment/PanacheJpaEntityEnhancer.java
Outdated
Show resolved
Hide resolved
.../src/main/java/io/quarkus/hibernate/orm/panache/deployment/PanacheJpaRepositoryEnhancer.java
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.
Looks much nicer. Big fan of the annotation based approach rather than the magical name system.
...anache/deployment/src/main/java/io/quarkus/hibernate/orm/panache/deployment/EntityField.java
Show resolved
Hide resolved
...c/main/java/io/quarkus/hibernate/orm/panache/deployment/PanacheFieldAccessMethodVisitor.java
Show resolved
Hide resolved
generateMethod("deleteAll", "()J", null, Opcodes.LRETURN, null); | ||
for (MethodInfo method : panacheEntityBaseClassInfo.methods()) { | ||
AnnotationInstance bridge = method.annotation(JandexUtil.DOTNAME_GENERATE_BRIDGE); | ||
if (bridge != null) |
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.
do we require braces? (please say yes)
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.
I'll say not if the formatter does not, and it does not ;)
Thanks guys! |
No more special cases: all methods annotated with
GenerateBridge
will be plugged in, like I had it in panache-rx.Added the panache-common-deployment module to hold classes common to both jpa/rx implementations that have no place at runtime.