Difference between LEFT JOIN and LEFT JOIN FETCH in Hibernate?

Barry picture Barry · Jul 27, 2011 · Viewed 56.4k times · Source

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

Can anyone explain this?

Thanks

Answer

Ryan Stewart picture Ryan Stewart · Jul 27, 2011

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.