Search⌘ K
AI Features

Hibernate and JPA

Explore how to integrate SQL databases in Quarkus applications using Hibernate and the Jakarta Persistence API. Learn to configure necessary extensions, define entities with annotations, and perform CRUD operations through an example to manage data effectively.

Introduction

The Jakarta Persistence API JPA is a specification of Java. It is used to persist data in relational databases.

Hibernate is a popular implementation of the JPA specifications and it is the most popular Java ORMObject-relational mapping used to fetch and update data in different databases.

Adding the extensions

To use an SQL database, we need to add a couple of dependencies, the first being quarkus-hibernate-orm, the Hibernate extension for Quarkus. The second is the ...