hibernatehqlfetching-strategy

Difference between LEFT JOIN and LEFT JOIN FETCH in Hibernate?


I am trying to understand the difference between LEFT JOIN and LEFT JOIN FETCH in Hibernate.

Can anyone explain this?

Thanks


Solution

  • The "fetch" tells hibernate to load it now instead of letting it be loaded lazily. The reference guide has a whole chapter dealing with such things that it's good to be acquainted with.