The Spring Data findAll Anti-Pattern
Introduction In this article, we are going to see why inheriting the default Spring Data findAll method in every data access Repository is a terrible Anti-Pattern.
The best way to fetch a Spring Data JPA DTO Projection
Introduction In this article, I’m going to show you what is the best way to fetch a Spring Data JPA DTO Projection. Apart from the basic use cases, we’re going to see how to fetch even hierarchical DTO structures using Spring Data JPA.
The best way to map MonetaryAmount with JPA and Hibernate
Introduction In this article, we are going to see what is the best way to map the MonetaryAmount object from Java Money and the Currency API when using JPA and Hibernate. While the Java Money and Currency API define the specification, like the MonetaryAmount interface, the Moneta project provides a reference implementation for this API.
Spring Data JPA MultipleBagFetchException
Introduction In this article, I’m going to show you how to handle the MultipleBagFetchException thrown by Hibernate upon simultaneously fetching multiple collections with Spring Data JPA.
The best Spring Data JpaRepository
Introduction In this article, I’m going to show you the best way to use the Spring Data JpaRepository, which, most often, is used the wrong way. The biggest issue with the default Spring Data JpaRepository is the fact that it extends the generic CrudRepository, which is not really compatible with the JPA specification.

