You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _posts/2026-06-15-introducing-quarkus-data.adoc
+17-17Lines changed: 17 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,14 +10,14 @@ author: lmolteni
10
10
11
11
== Quarkus Data: One Gateway for Data Access
12
12
13
-
You might have read Stephane's https://quarkus.io/blog/hibernate-panache-next/[blog post] about Panache Next, the new version of Panache that we're currently developing, and https://quarkus.io/blog/panache-next-renamed-to-quarkus-data/[his follow-up] on the rename to Quarkus Data.
13
+
You might have read Stephane's https://quarkus.io/blog/hibernate-panache-next/[blog post] about Panache Next, the new version of Panache that we're currently developing, and https://quarkus.io/blog/panache-next-renamed-to-quarkus-data/[his follow-up] on the renaming to Quarkus Data.
14
14
This blog post is about what comes next.
15
15
16
16
Having discussed current database access patterns in conferences, meetings and user feedback sessions, we know that the current implementation of Panache, which we'll call Panache 1 in this blog post, is popular as a data access mechanism.
17
17
But despite Panache 1's popularity, we discovered that there is some confusion on exactly what Quarkus extension to use.
18
18
19
-
Should a user that needs database access in a Quarkus application use the Hibernate extension, the Hibernate Reactive extension, Panache, or something else?
20
-
Given that Hibernate is currently the most popular extension in Quarkus (as most applications will need persistence on the database) you might imagine that this confusion is creating some friction.
19
+
Should a Quarkus application that needs database access use the Hibernate extension, the Hibernate Reactive extension, Panache, or something else?
20
+
Given that Hibernate is currently the most popular extension in Quarkus (as most applications will need persistence on the database), you might imagine that this confusion is creating some friction.
21
21
22
22
Try it yourself: create a Quarkus app with the CLI, then search for a database extension:
23
23
@@ -44,9 +44,9 @@ Every one of those extensions exists because it solves a real problem.
44
44
To understand how we got here, we need to go back to the early days of Quarkus.
45
45
46
46
Developers wanted a simple way to avoid writing repetitive data access code: define an entity, get basic CRUD operations, and declare queries in a single place without writing similar query methods by hand.
47
-
Also, users love the idea of the "repository class", a class that will hold such queries and some helpers to avoid writing code.
47
+
Also, developers love the idea of the "repository class", a class that will hold such queries and some helpers to avoid writing code.
48
48
At the time, there was no standard repository pattern for Hibernate, so the Quarkus team created Panache to fill that gap.
49
-
Panache provided a repository pattern, a single place to define queries for each entity, and also offered an active record pattern to simplify data access by putting persistence methods directly on their entities.
49
+
Panache provided a repository pattern, a single place to define queries for each entity, and also offered richer entities to simplify data access by putting persistence methods directly on their entities.
50
50
51
51
Since then, the Jakarta EE ecosystem has caught up.
52
52
Jakarta Data <<jd>> standardizes the repository pattern across SQL and NoSQL databases, with an annotation processor that generates implementations at compile time, including full type checking of queries and parameter bindings against your entity model.
@@ -57,19 +57,19 @@ With Jakarta Data now providing some of the features Panache pioneered, it was n
57
57
58
58
We then created "Quarkus Data": an umbrella project for data access in Quarkus.
59
59
It groups all data access extensions we showed earlier under a single name, making it easier to find documentation and understand how the pieces fit together.
60
-
This is the biggest change to data access in Quarkus since the introduction of Panache, and we believe it's a step forward for both new and existing users.
60
+
This is the biggest change to data access in Quarkus since the introduction of Panache, and we believe it's a step forward for both new and existing users. It's the first part towards a better user experience for newcomers, but it's not yet done: having a new extension means having more complexity, not less. Part of the future work will be to make Quarkus Data the obvious entry point across the CLI tools, the documentation, code.quarkus.io, and other places.
61
61
62
62
[NOTE]
63
-
.Why "Quarkus Data" and not "Panache Next"?
63
+
.Why "Quarkus Data" and not "Panache 2.0"?
64
64
====
65
65
The Panache name was popular with our users, but it had a discoverability problem.
66
66
"Hibernate with Panache" was meant to signal a better Hibernate experience, but if you didn't already know what Panache was, the name didn't tell you.
67
-
A user searching for "hibernate" or "data" would see Panache in the results, but nothing about the name suggested it was the simpler way to do repositories, active record, or CRUD.
68
-
We chose "Data" because the project is built on Jakarta Data, it's self-explanatory, and it might help users migrating from Spring as they're already used to the "Data" naming.
67
+
A user searching for "hibernate" or "data" would see Panache in the results, but nothing about the name suggested it was the simpler way to do repositories, or any of its other features.
68
+
We chose "Data" because the project is built on Jakarta Data, it's self-explanatory, and it might help users migrating from other frameworks as they're already used to the "Data" naming, i.e. Spring, Micronaut, Helidon...
69
69
It's also an opportunity to create an umbrella that covers both SQL and NoSQL under the same name.
70
70
====
71
71
72
-
Under the Quarkus Data umbrella, there are specific modules for different backends.
72
+
Under the Quarkus Data umbrella, there can be specific modules for different backends.
73
73
The first one is **Quarkus Data Hibernate**, for relational databases.
74
74
In the future, additional modules like Quarkus Data MongoDB could follow the same model for NoSQL databases.
75
75
@@ -94,15 +94,15 @@ Or in your `pom.xml`:
94
94
----
95
95
96
96
This single extension gives you everything you need to start with data access in your application. It's structured in a way that makes "simple things easy, and complex things possible".
97
-
This means that it offers an experience that is enjoyable for newcomers of Hibernate, without limiting advanced users from using advanced features.
97
+
This means that it offers an experience that is enjoyable for newcomers to Hibernate, without limiting advanced users from using advanced features.
98
98
99
-
Here's a roundup of the features it offers:
99
+
Here's a round-up of the features it offers:
100
100
101
-
- **Active Record Pattern support**: entity lifecycle operations are on your entity by extending a simple class. The simplest way to get started.
102
-
- **Repositories**: define a standalone repository interface annotated with `@Repository`. The Hibernate annotation processor generates the implementation at compile time, with full type checking of queries and parameters against your entity model.
101
+
- **Richer entities**: your entity gets lifecycle operations by extending a simple class. The simplest way to get started.
102
+
- **Repositories**: define a standalone repository interface annotated with `@Repository`, along with queries consisting simply in strings using the HQL/JPQL languages from Jakarta Persistence. The Hibernate annotation processor generates the implementation at compile time, with full type checking of queries and parameters against your entity model.
103
103
- **Stateless and Managed session**: Explicit lifecycles for simple cases, all the power of Hibernate managed objects when you need it.
104
-
- **Reactive**: The same entity model and project work in both blocking and non-blocking modes, useful when you need to interface with reactive code.
105
-
- **Raw SQL**: write native SQL queries using `@SQL` on a repository method for those cases in which writing SQL is easier. No entity mapping required.
104
+
- **Reactive**: The same entity model and project work in both blocking and non-blocking modes, useful when you need to integrate with reactive code.
105
+
- **Raw SQL**: write native SQL queries using `@SQL` on a repository method when writing SQL is easier. No entity mapping required.
106
106
107
107
[NOTE]
108
108
====
@@ -126,7 +126,7 @@ We are working on migration tooling to help existing Panache 1 users transition
126
126
== Try it today
127
127
128
128
You can try Quarkus Data Hibernate today from Quarkus 3.37.0.
129
-
It will also ship in Quarkus 4.0.
129
+
It will also ship as part of https://github.com/quarkusio/quarkus/discussions/52020[Quarkus 4.0].
130
130
131
131
Give it a try and let us know what you think. Feedback is welcome on https://quarkusio.zulipchat.com/#narrow/channel/187038-dev/topic/WG.20-.20Quarkus.20Data/with/602434654[Zulip] or via https://github.com/quarkusio/quarkus/issues[GitHub issues].
0 commit comments