How to avoid the Hibernate Query Cache N+1 issue

Introduction I recently answered this question on the Hibernate forum, and since it’s a very good one, I decided to turn it into an article. In this post, we will describe how the N+1 query issue is generated when using the second-level Hibernate Query Cache.