When retrieving a list of entities from database, if those entities have many-to-one or one-to-many mapping, then it would make separate queries to load those child items.
The obvious way to fix the problem is to use join fetch.
But you can read on the N+1 Selects problem in Hibernate and How to Avoid it with examples for more info.
Top comments (0)