How to Generate Values of Basic Entity Attributes with Hibernate

How to Generate Values of Basic Entity Attributes with Hibernate

Hibernate and the JPA specification define multiple generators to create unique primary key values. An obvious question when learning about these generators is if you can apply them to basic attributes as well. Unfortunately, the answer is no. But Hibernate’s ValueGenerator provides an easy-to-use alternative. As I will show you in this article, you can…

Panache – Repository Pattern

Panache – Repository Pattern

Panache is a Quarkus-specific library that handles most of the boilerplate code usually required by JPA-based persistence layers. One of the features it provides is ready-to-use and easily customizable repositories for your entity classes. Repositories are a very popular pattern for Java-based persistence layers. They encapsulate the database operations you can perform on entity objects…