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

Updated docs for Panache marker removal #38327

Merged
merged 1 commit into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 5 additions & 31 deletions docs/src/main/asciidoc/hibernate-orm-panache.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1412,36 +1412,10 @@ That's all there is to it: with Panache, Hibernate ORM has never looked so trim

== Defining entities in external projects or jars

Hibernate ORM with Panache relies on compile-time bytecode enhancements to your entities.
Hibernate ORM with Panache in Quarkus relies on compile-time bytecode enhancements to your entities. If you define your entities in the
same project where you build your Quarkus application, everything will work fine.

It attempts to identify archives with Panache entities (and consumers of Panache entities)
by the presence of the marker file `META-INF/panache-archive.marker`. Panache includes an
annotation processor that will automatically create this file in archives that depend on
Panache (even indirectly). If you have disabled annotation processors you may need to create
this file manually in some cases.
If the entities come from external projects
or jars, you can make sure that your jar is treated like a Quarkus application library by adding an empty `META-INF/beans.xml` file.

WARNING: If you include the jpa-modelgen annotation processor this will exclude the Panache
annotation processor by default. If you do this you should either create the marker file
yourself, or add the `quarkus-panache-common` as well, as shown below:

[source,xml]
----
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${compiler-plugin.version}</version>
<configuration>
<annotationProcessorPaths>
<annotationProcessorPath>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-jpamodelgen</artifactId>
<version>${hibernate.version}</version>
</annotationProcessorPath>
<annotationProcessorPath>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-panache-common</artifactId>
<version>${quarkus.platform.version}</version>
</annotationProcessorPath>
</annotationProcessorPaths>
</configuration>
</plugin>
----
This will allow Quarkus to index and enhance your entities as if they were inside the current project.
36 changes: 5 additions & 31 deletions docs/src/main/asciidoc/hibernate-reactive-panache.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1173,36 +1173,10 @@ That's all there is to it: with Panache, Hibernate Reactive has never looked so

== Defining entities in external projects or jars

Hibernate Reactive with Panache relies on compile-time bytecode enhancements to your entities.
Hibernate Reactive with Panache relies on compile-time bytecode enhancements to your entities. If you define your entities in the
same project where you build your Quarkus application, everything will work fine.

It attempts to identify archives with Panache entities (and consumers of Panache entities)
by the presence of the marker file `META-INF/panache-archive.marker`. Panache includes an
annotation processor that will automatically create this file in archives that depend on
Panache (even indirectly). If you have disabled annotation processors you may need to create
this file manually in some cases.
If the entities come from external projects
or jars, you can make sure that your jar is treated like a Quarkus application library by adding an empty `META-INF/beans.xml` file.

WARNING: If you include the jpa-modelgen annotation processor this will exclude the Panache
annotation processor by default. If you do this you should either create the marker file
yourself, or add the `quarkus-panache-common` as well, as shown below:

[source,xml]
----
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${compiler-plugin.version}</version>
<configuration>
<annotationProcessorPaths>
<annotationProcessorPath>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-jpamodelgen</artifactId>
<version>${hibernate.version}</version>
</annotationProcessorPath>
<annotationProcessorPath>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-panache-common</artifactId>
<version>${quarkus.platform.version}</version>
</annotationProcessorPath>
</annotationProcessorPaths>
</configuration>
</plugin>
----
This will allow Quarkus to index and enhance your entities as if they were inside the current project.
12 changes: 6 additions & 6 deletions docs/src/main/asciidoc/mongodb-panache.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1254,13 +1254,13 @@ That's all there is to it: with Panache, MongoDB has never looked so trim and ne

== Defining entities in external projects or jars

MongoDB with Panache relies on compile-time bytecode enhancements to your entities.
MongoDB with Panache relies on compile-time bytecode enhancements to your entities. If you define your entities in the
same project where you build your Quarkus application, everything will work fine.

It attempts to identity archives with Panache entities (and consumers of Panache entities)
by the presence of the marker file `META-INF/panache-archive.marker`. Panache includes an
annotation processor that will automatically create this file in archives that depend on
Panache (even indirectly). If you have disabled annotation processors you may need to create
this file manually in some cases.
If the entities come from external projects
or jars, you can make sure that your jar is treated like a Quarkus application library by adding an empty `META-INF/beans.xml` file.

This will allow Quarkus to index and enhance your entities as if they were inside the current project.

== Multitenancy

Expand Down
Loading