Skip to content
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

Activate annotation processors again for panache #15064

Merged
merged 1 commit into from
Feb 16, 2021

Conversation

Postremus
Copy link
Member

We depend on the jpamodelgen annotation processor in the panache modules, to create the Meta Model for e.g. the PanacheEntity class.

closes #14926

@Postremus
Copy link
Member Author

Postremus commented Feb 14, 2021

@stuartwdouglas
Would you review this PR, please?
According to git blame, you added the proc:none initially.

@famod
Copy link
Member

famod commented Feb 14, 2021

FTR, proc:none was added in this commit: a28d76b (1.5.0.CR1).

Copy link
Member

@stuartwdouglas stuartwdouglas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't want PanacheAnnotationProcessor (a28d76b#diff-3b62cdfb1058fa132560380d194f6b00371f9426fdc7f4bf759a2ccb36c7febaR28) to be run, can you change this to just run the hibernate one?

@Postremus
Copy link
Member Author

@stuartwdouglas done

@stuartwdouglas
Copy link
Member

Can we also add a test for this to make sure that we don't run into this in future? Otherwise looks good.

@Postremus
Copy link
Member Author

@stuartwdouglas Added a simple test to hibernate-panache and hibernate-reactive-panache, which just checks if the metamodel was generated.

We depend on the jpamodelgen annotation processor in the panache modules, to create the Meta Model for e.g. the PanacheEntity class.
@stuartwdouglas stuartwdouglas added the triage/waiting-for-ci Ready to merge when CI successfully finishes label Feb 16, 2021
@famod famod merged commit a5937a7 into quarkusio:master Feb 16, 2021
@quarkus-bot quarkus-bot bot added this to the 1.13 - master milestone Feb 16, 2021
@famod
Copy link
Member

famod commented Feb 16, 2021

Thanks @Postremus!

@famod famod removed the triage/waiting-for-ci Ready to merge when CI successfully finishes label Feb 16, 2021
@Postremus Postremus deleted the 14926 branch February 17, 2021 06:42
@gsmet gsmet modified the milestones: 1.13 - master, 1.12.0.Final Feb 17, 2021
@Postremus
Copy link
Member Author

@ninaHerpertz Simply adding the hibernate-jpamodelgen annotation processor should work in your case. See https://quarkus.io/guides/hibernate-orm-panache#defining-entities-in-external-projects-or-jars

You need to do this anyway, even for PanacheEntity.
Quarkus uses jpamodelgen for meta-model generation inside the quarkus-hibernate-orm-panache module. Any other modules containing entities need to define this annotation processor seperatly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

hibernate-jpamodelgen is causing problems
4 participants