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…

Native Queries – How to call native SQL queries with JPA & Hibernate
| | |

Native Queries – How to call native SQL queries with JPA & Hibernate

The Java Persistence Query Language (JPQL) is the most common way to query data from a database with JPA. It enables you to reuse your mapping definitions and is easier to use than SQL. But it supports only a small subset of the SQL standard, and it also provides no support for database-specific features. So…

Logging Guide for Hibernate 4, 5 & 6 – Use the right config for dev and prod
|

Logging Guide for Hibernate 4, 5 & 6 – Use the right config for dev and prod

Choosing the right logging configuration can make the difference between finding a performance issue during development or suffering from it on production. But it can also create an overhead that slows down your application. You need to decide which information you need and configure your system accordingly. I, therefore, prefer to use two different configurations:…