How to cascade DELETE unidirectional associations with Spring Data JPA

Introduction In this article, we are going to see how to cascade DELETE the unidirectional associations with Spring Data JPA when we cannot rely on the CascadeType mechanism that propagates state transitions from parent to child entities.

How to batch INSERT statements with MySQL and Hibernate

Introduction In this article, we are going to see how we can batch INSERT statements when using MySQL and Hibernate. While Hibernate has long supported automated JDBC batch inserts, this feature doesn’t work when using the IDENTITY identifier generator strategy. Unfortunately, MySQL doesn’t support SEQUENCE objects, so using IDENTITY is the only reasonable option. Therefore, I’m going to show you a technique you can use to get Hibernate batch INSERT statements for entities that use the IDENTITY generator.

The best way to use Spring Data JPA Stream methods

Introduction In this article, we are going to see what is the best way to use Spring Data JPA Stream query methods. When having to fetch a larger result set, the advantage of using a Java Stream is that the query result set could be fetched progressively instead of getting all the data at once.

High-Performance Java Persistence Newsletter, Issue 55

Introduction Welcome to a new issue of the High-Performance Java Persistence Newsletter in which we share articles, videos, workshops, and StackOverflow answers that are very relevant to any developer who interacts with a database system using Java.