Entity Views with Blaze Persistence – The better DTO projections?

Entity Views with Blaze Persistence – The better DTO projections?

Blaze Persistence’s Entity Views try to solve some of the most common complaints about DTO projections in JPA and Hibernate. Most developers know that DTOs improve the performance of their read operations. But they often avoid using them because it requires boilerplate code and often creates code that’s not easily maintainable. JPA’s DTO support also…

Migrating to Hibernate 6

Migrating to Hibernate 6

Hibernate 6 has been released for a while, and I see more and more teams migrating their persistence layers or at least preparing for the migration. As so often, the work required for the migration to Hibernate 6 depends on your code quality and the Hibernate version you’re currently using. For most applications using Hibernate…

Create better Criteria queries with Blaze persistence

Create better Criteria queries with Blaze persistence

The Blaze Persistence project provides an interesting alternative to JPA’s Criteria API. Both APIs enable you to define queries dynamically at runtime. Most developers use it to create query statements based on user input or the result of a business operation. Unfortunately, JPA’s Criteria API isn’t very popular because it’s hard to read and write….

6 Performance Pitfalls when using Spring Data JPA

6 Performance Pitfalls when using Spring Data JPA

Thanks to its ease of use, Spring Data JPA is an incredibly popular persistence framework. If developers have something to complain about, they usually criticize object-relational mapping in general or the risk of performance problems. And while you can, of course, criticize the concept of object-relational mapping, you shouldn’t blame Spring Data JPA for your…

Database portability – Pitfalls when supporting multiple RDBMS with Hibernate

Database portability – Pitfalls when supporting multiple RDBMS with Hibernate

The JPA specification and Hibernate, as its most popular implementation, claim to provide database portability. That means you don’t need to change your persistence code or mapping annotations when connecting your application to a different RDBMS. They achieve that by providing an automated object-relational mapping, an API that abstracts from the executed SQL statements, and…