I’ve been learning about JPA and I found that we can use entity graph since JPA 2.1.
But I've not understood the merit of the entity graph yet.
I know that one of the merits to use an entity graph is we can specify only the data which we want to get among the whole entity, but in case we want to a whole entity, is there any other reason to use an entity graph?
Or we should use entity graphs only when we want to retrieve partial data?
If there is some other purpose or merit when we use entity graph, I would like to know it.
In JPA/Hibernate fetching entities with associations has always been a question for performance.
For code you can check my Github repository.