Skip to content

Commit b856f25

Browse files
yrodieregavinking
andcommitted
Hibernate 7 on Quarkus: apply suggestions from code review
Co-Authored-By: Gavin King <[email protected]>
1 parent 8849272 commit b856f25

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

_posts/2025-06-18-hibernate7-on-quarkus.adoc

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
layout: post
3-
title: 'Hibernate 7 on Quarkus: every new version is a better database experience for the users'
3+
title: 'Hibernate 7 on Quarkus: each new version brings a better database experience'
44
date: 2025-06-18
55
tags: hibernate, database, jpa
66
synopsis: A roundup on the new upgrades of Hibernate on Quarkus.
@@ -10,19 +10,19 @@ author: lmolteni
1010
ifdef::env-github,env-browser,env-vscode[:imagesdir: ../assets/images/posts/hibernate7]
1111

1212
=== Introduction
13-
Hibernate is improving at a very fast speed, and so is its Quarkus support, as great database access is a key part of the Quarkus experience.
14-
The new Quarkus 3.24 release upgrades Hibernate to version 7, a major upgrade that implies some breaking changes, and thus will require some investigation with the https://docs.jboss.org/hibernate/orm/7.0/migration-guide/migration-guide.html[migration guide] when upgrading.
15-
Developers working on Hibernate and Quarkus are constantly collaborating, so here’s a quick peek at what has happened in the last months and what Quarkus users might expect in the future.
13+
Hibernate is improving at a very fast speed, and so is its integration with Quarkus, as great database access is a key part of the Quarkus experience.
14+
The latest Quarkus 3.24 release upgrades Hibernate to version 7, a major upgrade that implies some breaking changes, and thus will requires paying attention to the https://docs.jboss.org/hibernate/orm/7.0/migration-guide/migration-guide.html[migration guide] when upgrading.
15+
Developers working on Hibernate and Quarkus are constantly collaborating, so here’s a quick peek at what happened over the last few months and at what Quarkus users might expect in the future.
1616

1717
=== License and Governance Updates
1818
Both Quarkus and Hibernate are now projects of the https://www.commonhaus.org[Commonhaus Foundation], a non-profit organization dedicated to creating a collaborative environment for open-source libraries.
19-
Since the upgrade to Hibernate 7, Quarkus and all modules of Hibernate now share the same open-source license: the https://www.apache.org/licenses/LICENSE-2.0[Apache License Version 2.0]. Implementing a proper open-source approach is crucial to the success of the two projects.
19+
Since the upgrade to Hibernate 7, Quarkus and all modules of Hibernate now share the same open-source license: the https://www.apache.org/licenses/LICENSE-2.0[Apache License Version 2.0].
2020

2121
=== Hibernate ORM 7.0 Updates
22-
The new version of Hibernate brings better performance and https://docs.jboss.org/hibernate/orm/7.0/whats-new/whats-new.html[all kinds of features], some of which improve the developer experience, such as https://docs.jboss.org/hibernate/orm/7.0/whats-new/whats-new.html#session-find-multiple[using `findMultiple()` and `getMultiple()`] to efficiently fetch entities in batches.
22+
The new version of Hibernate brings better performance and https://docs.jboss.org/hibernate/orm/7.0/whats-new/whats-new.html[all kinds of new features], some of which improve the developer experience, such as https://docs.jboss.org/hibernate/orm/7.0/whats-new/whats-new.html#session-find-multiple[using `findMultiple()` and `getMultiple()`] to efficiently fetch entities in batches.
2323

2424
==== Support for Jakarta Data
25-
https://jakarta.ee/specifications/data/1.0/jakarta-data-1.0[Jakarta Data] is a simpler way to write data accessing applications, and it’s been supported in Quarkus since https://in.relation.to/2024/11/04/data-in-quarkus/[November 2024]. We suggest giving it a try, as it enables a very quick and easy implementation of the DAO/repository patterns, without any boilerplate code and in a type-safe manner. Simply include the `jakarta.data:jakarta.data-api` dependency with the latest version of Quarkus, i.e.:
25+
https://jakarta.ee/specifications/data/1.0/jakarta-data-1.0[Jakarta Data] is a simpler way to write data-accessing applications, and it’s been supported in Quarkus since https://in.relation.to/2024/11/04/data-in-quarkus/[November 2024]. We suggest giving it a try, as it enables a very quick and easy implementation of the DAO/repository patterns, without any boilerplate code and in a type-safe manner. Simply include the `jakarta.data:jakarta.data-api` dependency with the latest version of Quarkus, i.e.:
2626

2727
[source,xml]
2828
----
@@ -58,7 +58,7 @@ In the meantime, you can always refer to the https://quarkus.io/version/main/gui
5858

5959

6060
==== New Restrictions API
61-
After the deprecation of the Hibernate Criteria API, developers were still missing its simplicity, so the Hibernate team introduced a new https://docs.jboss.org/hibernate/orm/7.0/introduction/html_single/Hibernate_Introduction.html#restrictions-and-ordering[Restriction API] that even has new features, such as the possibility to further restrict an already written query using JPQL/HQL.
61+
After the deprecation of the old Hibernate Criteria API, developers were still missing its simplicity, so the Hibernate team introduced a new https://docs.jboss.org/hibernate/orm/7.0/introduction/html_single/Hibernate_Introduction.html#restrictions-and-ordering[Restriction API] that even has new features, such as the possibility to further restrict an already-written JPQL/HQL query.
6262

6363
[source,java]
6464
----
@@ -93,19 +93,19 @@ var books =
9393

9494
=== Hibernate Reactive together with Hibernate ORM
9595

96-
A long-awaited feature is the ability to https://github.com/quarkusio/quarkus/issues/13425[mix Hibernate ORM and Hibernate Reactive extensions] in the same Quarkus application. Without this feature, making the two extensions coexist required workarounds that are now unnecessary as, since Quarkus 3.2.4, it is now possible to mix the two.
96+
A long-awaited feature is the ability to https://github.com/quarkusio/quarkus/issues/13425[mix Hibernate ORM and Hibernate Reactive extensions] in the same Quarkus application. Without this feature, making the two extensions coexist required workarounds that are now unnecessary as, since Quarkus 3.2.4, it's now possible to mix the two.
9797

98-
Hibernate Reactive is a powerful reactive data access abstraction, but its advantages vary per project. Instead of dictating usage, we enable users to experiment easily with both Hibernate ORM and Reactive. Projects using Hibernate ORM can add the Reactive extension, create reactive resources reusing mapped entities, running tests and benchmarks, and determine if it suits their specific needs and scalability goals. While using both, it’s easier to choose the most suitable approach for different use cases. Another benefit is that it makes it easier to migrate in small steps from one to the other as necessary.
98+
Hibernate Reactive is a powerful reactive data access abstraction, but its advantages vary per project. Instead of dictating usage, we enable users to experiment easily with both Hibernate ORM and Reactive. Projects using Hibernate ORM can add the Reactive extension, create reactive resources reusing mapped entities, run tests and benchmarks, and determine if it suits their specific needs and scalability goals. While using both, it’s easier to choose the most suitable approach for different use cases. Another benefit is that it makes it easier to migrate in small steps from one to the other as necessary.
9999

100-
Panache users will have this possibility in the API as well starting from https://github.com/quarkusio/quarkus/issues/46096[Panache 2.0]
100+
Panache users will also have this possibility starting from https://github.com/quarkusio/quarkus/issues/46096[Panache 2.0]
101101

102102
=== Injection of the SchemaManager
103103

104-
The Hibernate Schema Manager is a powerful tool to generate DDL scripts out of Java objects. Its power is now available to be used in Quarkus via a simple injection. This is particularly useful when https://docs.jboss.org/hibernate/orm/7.0/introduction/html_single/Hibernate_Introduction.html#testing[writing tests] letting you programmatically control when to do schema export, schema validation, data cleanup, and schema cleanup.
104+
The Hibernate Schema Manager is a powerful tool to generate DDL scripts out of Java objects. Its power is now available to be used in Quarkus via dependency injection. This is particularly useful when https://docs.jboss.org/hibernate/orm/7.0/introduction/html_single/Hibernate_Introduction.html#testing[writing tests] letting you programmatically control when to do schema export, schema validation, data cleanup, and schema cleanup.
105105

106106
=== The Future
107107

108-
The teams have many plans for the future of the projects: the DevUI of Quarkus will be enhanced with improvements to the developer experience, with the possibility of https://github.com/quarkusio/quarkus/issues/39584[executing arbitrary HQL queries] to try out the syntax and experiment with test data and https://github.com/quarkusio/quarkus/issues/43723[generating migration scripts on the fly]
108+
The teams have many plans for the future of these important projects: the DevUI of Quarkus will be enhanced with improvements to the developer experience, with the possibility of https://github.com/quarkusio/quarkus/issues/39584[executing arbitrary HQL queries] to try out the syntax and experiment with test data and https://github.com/quarkusio/quarkus/issues/43723[generating migration scripts on the fly]
109109

110110
image::console.gif[scaledwidth=100%]
111111

0 commit comments

Comments
 (0)