Skip to content

Commit 4b11349

Browse files
authored
Merge pull request #50515 from yrodiere/orm-config
Move Hibernate ORM/Reactive configuration reference to the bottom of the guides
2 parents 3416d05 + be53718 commit 4b11349

File tree

2 files changed

+23
-38
lines changed

2 files changed

+23
-38
lines changed

docs/src/main/asciidoc/hibernate-orm.adoc

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ They will often map to Hibernate ORM configuration properties but could have dif
100100

101101
Also, Quarkus will set many Hibernate ORM configuration settings automatically, and will often use more modern defaults.
102102

103-
For a list of the items that you can set in `{config-file}`, see <<hibernate-configuration-properties,Hibernate ORM configuration properties>>.
103+
For a list of the items that you can set in `{config-file}`, see <<configuration-reference>>.
104104

105105
An `EntityManagerFactory` will be created based on the Quarkus `datasource` configuration as long as the Hibernate ORM extension is listed among your project dependencies.
106106

@@ -295,9 +295,7 @@ There are no required properties, as long as a default datasource is configured.
295295
When no property is set, Quarkus can typically infer everything it needs to set up Hibernate ORM
296296
and will have it use the default datasource.
297297

298-
The configuration properties listed here allow you to override such defaults, and customize and tune various aspects.
299-
300-
include::{generated-dir}/config/quarkus-hibernate-orm.adoc[opts=optional, leveloffset=+2]
298+
The configuration properties listed in <<configuration-reference>> allow you to override such defaults, and customize and tune various aspects.
301299

302300
[NOTE]
303301
====
@@ -314,20 +312,6 @@ quarkus.hibernate-orm.persistence-xml.ignore=true
314312
----
315313
====
316314

317-
[TIP]
318-
====
319-
Want to start a PostgreSQL server on the side with Docker?
320-
321-
[source,bash]
322-
----
323-
docker run --rm=true --name postgres-quarkus-hibernate -e POSTGRES_USER=hibernate \
324-
-e POSTGRES_PASSWORD=hibernate -e POSTGRES_DB=hibernate_db \
325-
-p 5432:5432 postgres:14.1
326-
----
327-
328-
This will start a non-durable empty database: ideal for a quick experiment!
329-
====
330-
331315
[[multiple-persistence-units]]
332316
=== Multiple persistence units
333317

@@ -961,7 +945,7 @@ quarkus.hibernate-orm."offline".dialect.mariadb.bytes-per-character=1
961945
quarkus.hibernate-orm."offline".dialect.mariadb.no-backslash-escapes=true
962946
----
963947

964-
Refer to the <<hibernate-configuration-properties,Hibernate ORM configuration properties>> section for more details on the available properties.
948+
Refer to the <<configuration-reference>> section for more details on the available properties.
965949

966950

967951
[[caching]]
@@ -1949,3 +1933,8 @@ to learn more about the `dataStore` attribute.
19491933
Please refer to the corresponding https://hibernate.org/repositories/[Hibernate Data Repositories]
19501934
and https://jakarta.ee/specifications/data/1.0/jakarta-data-1.0[Jakarta Data]
19511935
guides to learn what else they have to offer.
1936+
1937+
[[configuration-reference]]
1938+
== Configuration Reference for Hibernate ORM
1939+
1940+
include::{generated-dir}/config/quarkus-hibernate-orm.adoc[opts=optional, leveloffset=+2]

docs/src/main/asciidoc/hibernate-reactive.adoc

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ Blocking (non-reactive) and reactive configuration xref:orm-and-reactive-extensi
116116

117117
WARNING: Configuring Hibernate Reactive using the standard `persistence.xml` configuration file is not supported.
118118

119-
See section <<hr-configuration-properties,Hibernate Reactive configuration properties>> for the list of properties you can set in `{config-file}`.
119+
See section <<configuration-reference>> for the list of properties you can set in `{config-file}`.
120120

121121
A `Mutiny.SessionFactory` will be created based on the Quarkus `datasource` configuration as long as the Hibernate Reactive extension is listed among your project dependencies.
122122

@@ -193,24 +193,7 @@ and will have it use the default datasource.
193193

194194
The configuration properties listed here allow you to override such defaults, and customize and tune various aspects.
195195

196-
Hibernate Reactive uses the same properties you would use for Hibernate ORM. You will notice that some properties
197-
contain `jdbc` in the name but there is no JDBC in Hibernate Reactive, these are simply legacy property names.
198-
199-
include::{generated-dir}/config/quarkus-hibernate-orm.adoc[opts=optional, leveloffset=+2]
200-
201-
[TIP]
202-
====
203-
Want to start a PostgreSQL server on the side with Docker?
204-
205-
[source,bash]
206-
----
207-
docker run --rm --name postgres-quarkus-hibernate -e POSTGRES_USER=quarkus_test \
208-
-e POSTGRES_PASSWORD=quarkus_test -e POSTGRES_DB=quarkus_test \
209-
-p 5432:5432 postgres:14.1
210-
----
211-
212-
This will start a non-durable empty database: ideal for a quick experiment!
213-
====
196+
Hibernate Reactive uses the same properties you would use for Hibernate ORM: see <<configuration-reference>>.
214197

215198
[[orm-and-reactive-extension-simultaneously]]
216199
=== Hibernate ORM and Reactive extensions simultaneously
@@ -446,3 +429,16 @@ by providing active record style entities (and repositories) and focuses on maki
446429
To find out more on how the <<quarkus-hibernate-orm_quarkus-hibernate-orm-validation-mode,`quarkus.hibernate-orm.validation.mode` configuration property>>.
447430
influence your Hibernate Reactive application see the xref:hibernate-orm.adoc#validator_integration[corresponding Hibernate ORM guide],
448431
as these modes work the same in both cases.
432+
433+
[[configuration-reference]]
434+
== Configuration Reference for Hibernate Reactive
435+
436+
[TIP]
437+
====
438+
You will notice that some properties
439+
contain "jdbc" in their name: this is because Hibernate ORM refers to its "data access" layer as "JDBC" for historical reasons. Hibernate Reactive uses Vert.x Reactive SQL clients for its data access layer rather than JDBC.
440+
441+
Regardless of their name, these properties still make sense for Hibernate Reactive.
442+
====
443+
444+
include::{generated-dir}/config/quarkus-hibernate-orm.adoc[opts=optional, leveloffset=+2]

0 commit comments

Comments
 (0)