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…

LazyInitializationException – What it is and the best way to fix it
|

LazyInitializationException – What it is and the best way to fix it

The LazyInitializationException is one of the most common exceptions when working with Hibernate. There are a few easy ways to fix it. But unfortunately, you can also find lots of bad advice online. The proclaimed fixes often replace the exception with a hidden problem that will cause trouble in production. Some of them introduce performance…

Hibernate Tip: Many-to-Many Association with additional Attributes

Hibernate Tip: Many-to-Many Association with additional Attributes

Hibernate Tips is a series of posts in which I describe a quick and easy solution for common Hibernate questions. If you have a question for a future Hibernate Tip, please post a comment below. Question: I got several questions, like the following one by Carme, about the mapping of a many-to-many association that contains…