hibernate Fetching in hibernate


Fetching is really important in JPA (Java Persistence API). In JPA, HQL(Hibernate Query Language) and JPQL(Java Persistence Query Language) are used to fetch the entities based on their relationships. Although it is way better than using so many joining queries and sub-queries to get what we want by using native SQL, the strategy how we fetch the associated entities in JPA are still essentially effecting the performance of our application.