This is the classic trap. You fetch a list of Post entities, and then for each post, you access the post.comments list. If lazy loading is enabled (as it should be), Hibernate triggers a separate SQL query for every post to fetch its comments.
It was 11:47 PM, and the deployment was failing. High-performance Java Persistence.pdf
// Bad: N+1 queries List<Post> posts = entityManager.createQuery("select p from Post p", Post.class).getResultList(); This is the classic trap