11 JPA and Hibernate query hints every developer should know
| |

11 JPA and Hibernate query hints every developer should know

JPA and Hibernate support a set of hints that you can use to provide additional information to your persistence provider to influence the execution of a query. You can use them for lots of different things, like setting a timeout for your query, using an entity graph, or defining the caching of a query result….

Hibernate Performance Tuning – 2024 Edition
| |

Hibernate Performance Tuning – 2024 Edition

Based on most discussions online and at conferences, there seem to be 2 kinds of projects that use Hibernate for their persistence layer: So, what’s the difference between these projects? Are the projects in the 2nd group more complex or have higher performance requirements? No, based on my consulting projects, that’s not the case. On…

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…