The best way to use one-to-one table relationships
Introduction In this article, we are going to see what is the best way to use one-to-one table relationships. I decided to write this article after reading this Tweet: One-to-one table relationships As...
View ArticleHow to fetch multiple to-many relationships with jOOQ MULTISET
Introduction In this article, we are going to see how we can fetch multiple to-many relationships with jOOQ MULTISET so that we avoid bumping into an unintentional Cartesian Product. The approach taken...
View ArticleSpring Data Query By Example
Introduction In this article, we are going to see how the Spring Data JPA Query By Example (QBE) feature works, when you should use it, and what limitations it has. While Spring Data JPA already...
View ArticleHigh-Performance Java Persistence Newsletter, Issue 52
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...
View ArticleHow to customize the HibernateTypesContributor from Hypersistence Utils
Introduction In this article, we are going to see how to customize the HibernateTypesContributor from Hypersistence Utils so that we can disable all or filter out certain Types. What does...
View ArticleSoft delete and JPA version property
Introduction In this article, we are going to see how we can implement a soft delete mechanism when the JPA entity features a version property. If you are not using a version property for optimistic...
View ArticleJDBC Profiling with VisualVM
Introduction In this article, we are going to see how we can do JDBC profiling using the VisualVM tool to find slow-running SQL queries or discover N+1 query issues. VisualVM VisualVM is an OSS tool...
View ArticleHigh-Performance Java Persistence Newsletter, Issue 53
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...
View ArticleSQL Server useBulkCopyForBatchInsert configuration property
Introduction In this article, we are going to see how the SQL Server useBulkCopyForBatchInsert configuration property works when using JDBC, JPA, or Hibernate. SQL Server PreparedStatement batching...
View ArticleThe best way to use JPA bidirectional sync methods
Introduction In this article, we are going to see what are the best way to use JPA bidirectional sync methods for one-to-many, one-to-one, and many-to-many associations. For an introduction to why you...
View ArticleThe best way to hide the JPA entity identifier
Introduction In this article, I’m going to show you the best way to hide the JPA entity identifier so that the users of your application won’t be able to guess and access data that belongs to other...
View ArticlePostgreSQL JDBC Statement Caching
Introduction In this article, we’re going to see how the PostgreSQL JDBC Driver implements Statement Caching and what settings we need to configure in order to optimize the performance of our data...
View ArticleHigh-Performance Java Persistence Newsletter, Issue 54
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...
View ArticleHow to fetch multiple JPA collections with Blaze Persistence MULTISET
Introduction In this article, we are going to see how we can fetch multiple JPA entity collections without generating an implicit Cartesian Product with the MULTISET strategy offered by the Blaze...
View ArticleHow to find the source of an SQL query generated by Hibernate
Introduction In this article, we are going to see how we can find the source of an SQL query generated by Hibernate. Knowing where a given SQL query originates from is very useful when trying to...
View ArticleTen years of blogging
Ten years later! Ten years ago today, I decided to start blogging and published this article about injecting a List of Spring beans using the @Autowired annotation. On every blog anniversary, I write a...
View ArticleHigh-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...
View ArticleThe 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...
View ArticleHow 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...
View ArticleHow 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...
View Article