Skip to content
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
18 changes: 14 additions & 4 deletions documentation/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import org.asciidoctor.gradle.jvm.AsciidoctorTask

import java.time.Year
import java.util.regex.Matcher

plugins {
id "org.asciidoctor.jvm.convert"
Expand Down Expand Up @@ -85,10 +86,10 @@ def aggregateJavadocsTask = tasks.register( 'aggregateJavadocs', Javadoc ) {
def ormMinorVersion = matcher.find() ? matcher.group() : "5.6";

links = [
'https://docs.oracle.com/en/java/javase/11/docs/api/',
'http://docs.jboss.org/hibernate/beanvalidation/spec/2.0/api/',
'https://jakarta.ee/specifications/platform/8/apidocs/',
"https://docs.jboss.org/hibernate/orm/" + ormMinorVersion + "/javadocs/"
'https://docs.oracle.com/en/java/javase/17/docs/api/',
'https://jakarta.ee/specifications/bean-validation/3.1/apidocs/',
'https://jakarta.ee/specifications/platform/11/apidocs/',
"https://docs.hibernate.org/orm/" + ormMinorVersion + "/javadocs/"
]

options.addStringOption( 'Xdoclint:none', '-quiet' )
Expand Down Expand Up @@ -141,6 +142,14 @@ def renderReferenceDocumentationTask = tasks.register( "renderReferenceDocumenta
def asciidocReference = layout.projectDirectory.dir("src/main/asciidoc/reference")
def unpackedThemeAsciidoc = rootProject.layout.buildDirectory.dir("unpacked-theme/hibernate-asciidoctor-theme/asciidoc")
def docInfoHibernate = rootProject.layout.buildDirectory.dir("unpacked-theme/hibernate-asciidoctor-theme/asciidoc/docinfo/hibernate")
def ormMinorVersion = libs.versions.hibernateOrmVersion.map { v ->
def matcher = v =~ /\d+\.\d+/
if (matcher.find()) {
return matcher.group()
} else {
throw new IllegalArgumentException("Cannot parse the version of Hibernate ORM from '" + v + "' string.")
}
}

asciidoctorj {
version = "3.0.0"
Expand Down Expand Up @@ -170,6 +179,7 @@ def renderReferenceDocumentationTask = tasks.register( "renderReferenceDocumenta
"source-highlighter": "rouge",
majorMinorVersion: versionFamily.get(),
fullVersion: fullVersion.get(),
ormMinorVersion: ormMinorVersion.get(),
stylesdir: "css",
"iconfont-remote": false,
"iconfont-name": "font-awesome/css/solid",
Expand Down
20 changes: 10 additions & 10 deletions documentation/src/main/asciidoc/reference/introduction.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ implementation of JPA. If you've never used JPA before, that's OK, but you
might need to refer to the following sources of information at some points
in this text:

- the http://hibernate.org/orm/documentation/5.6/[documentation for Hibernate ORM],
- the https://jcp.org/aboutJava/communityprocess/mrel/jsr338/index.html[JPA 2.2 specification], or
- the http://hibernate.org/orm/documentation/{ormMinorVersion}/[documentation for Hibernate ORM],
- the https://jakarta.ee/specifications/persistence/3.2/jakarta-persistence-spec-3.2[Jakarta Persistence 3.2 specification], or
- https://www.manning.com/books/java-persistence-with-hibernate-second-edition[Java Persistence with Hibernate],
the latest edition of the book originally titled _Hibernate in Action_.

Expand Down Expand Up @@ -77,7 +77,7 @@ You don't need to depend on the JDBC driver for your database.
=== Optional dependencies

:slf4j: http://www.slf4j.org/
:enhancer: https://docs.jboss.org/hibernate/orm/5.4/topical/html_single/bytecode/BytecodeEnhancement.html
:enhancer: https://docs.hibernate.org/orm/{ormMinorVersion}/topical/html_single/bytecode/

Optionally, you might also add any of the following additional features:

Expand All @@ -103,7 +103,7 @@ There's an example {build}[Gradle build] included in the example program.
=== Basic configuration

:xml: https://github.com/hibernate/hibernate-reactive/blob/main/examples/session-example/src/main/resources/META-INF/persistence.xml
:configuration-properties: https://docs.jboss.org/hibernate/orm/5.4/userguide/html_single/Hibernate_User_Guide.html#configurations
:configuration-properties: https://docs.hibernate.org/orm/{ormMinorVersion}/userguide/html_single/#configurations


Hibernate Reactive is configured via the standard JPA `persistence.xml`
Expand Down Expand Up @@ -333,8 +333,8 @@ of framework code.

=== Mapping entity classes

:mapping-annotations: https://docs.jboss.org/hibernate/orm/5.4/userguide/html_single/Hibernate_User_Guide.html#annotations
:bean-validation: https://docs.jboss.org/hibernate/stable/validator/reference/en-US/html_single/#chapter-bean-constraints
:mapping-annotations: https://docs.hibernate.org/orm/{ormMinorVersion}/userguide/html_single/#annotations
:bean-validation: https://docs.hibernate.org/stable/validator/reference/en-US/html_single/#chapter-bean-constraints

We won't have much to say about the entity classes here, simply because
the principles behind mapping entity classes in Hibernate Reactive,
Expand Down Expand Up @@ -578,8 +578,8 @@ custom reactive identifier generator.

=== JSON Mapping

:orm-json-basic-mapping: https://docs.jboss.org/hibernate/orm/7.0/userguide/html_single/Hibernate_User_Guide.html#basic-mapping-json
:orm-json-embeddable-mapping: https://docs.jboss.org/hibernate/orm/7.0/userguide/html_single/Hibernate_User_Guide.html#_jsonxml_aggregate_embeddable_mapping
:orm-json-basic-mapping: https://docs.hibernate.org/orm/{ormMinorVersion}/userguide/html_single/#basic-mapping-json
:orm-json-embeddable-mapping: https://docs.hibernate.org/orm/{ormMinorVersion}/userguide/html_single/#_jsonxml_aggregate_embeddable_mapping
:string-to-json-converter: https://github.com/hibernate/hibernate-reactive/blob/main/hibernate-reactive-core/src/test/java/org/hibernate/reactive/types/StringToJsonConverter.java

Like in Hibernate ORM, it's possible to map a JSON field using the {orm-json-basic-mapping}[SqlTypes.JSON]
Expand Down Expand Up @@ -1306,7 +1306,7 @@ or `delete` queries, or even native SQL that calls a stored procedure!

=== Association fetching

:association-fetching: https://docs.jboss.org/hibernate/orm/5.4/userguide/html_single/Hibernate_User_Guide.html#fetching
:association-fetching: https://docs.hibernate.org/orm/{ormMinorVersion}/userguide/html_single/#fetching

Achieving high performance in ORM means minimizing the number of round
trips to the database. This goal should be uppermost in your mind
Expand Down Expand Up @@ -1368,7 +1368,7 @@ You can find much more information about association fetching in the

=== Enabling the second-level cache

:second-level-cache: https://docs.jboss.org/hibernate/orm/5.4/userguide/html_single/Hibernate_User_Guide.html#caching
:second-level-cache: https://docs.hibernate.org/orm/{ormMinorVersion}/userguide/html_single/#caching

A classic way to reduce the number of accesses to the database is to
use a second-level cache, allowing cached data to be shared between
Expand Down
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ pluginManagement {

rootProject.name = 'hibernate-reactive'

// When updating the baseline, make sure to update the JDK version in the javadoc link
gradle.ext.baselineJavaVersion = JavaLanguageVersion.of( 17 )

// Gradle does bytecode transformation on tests.
Expand Down
Loading