Inheritance Strategies with JPA and Hibernate – The Complete Guide
|

Inheritance Strategies with JPA and Hibernate – The Complete Guide

Inheritance is one of the key concepts in Java. So, it’s no surprise that most developers want to use it in their domain model. Unfortunately, the relational table model doesn’t know this concept. So, Hibernate, or any other JPA implementation, has to apply a mapping strategy to map your inheritance hierarchy to one or more…

TimezoneStorageType – Hibernate’s improved timezone mapping
|

TimezoneStorageType – Hibernate’s improved timezone mapping

Working with timestamps with timezone information has always been a struggle. Since Java 8 introduced the Date and Time API, OffsetDateTime and ZonedDateTime have become the most obvious and commonly used types to model a timestamp with timezone information. And you might expect that choosing one of them should be the only thing you need…

How to persist additional attributes for an association with JPA and Hibernate
|

How to persist additional attributes for an association with JPA and Hibernate

JPA and Hibernate allow you to define associations between entities with just a few annotations, and you don’t have to care about the underlying table model in the database. Even join tables for many-to-many associations are hidden behind a @JoinTable annotation, and you don’t need to model the additional table as an entity. That changes…

8 things you need to know when migrating to Hibernate 6.x
|

8 things you need to know when migrating to Hibernate 6.x

Hibernate 6 has been released for a while, and the latest Spring Data JPA version includes it as a dependency. So, it’s no surprise that more and more developers want to migrate their applications to the latest Hibernate version. As you’re reading this article, you’re probably one of them. And you might ask yourself what…