Hibernate: Understanding Lazy Fetching

Hibernate: Understanding Lazy Fetching: I found last night a interesting and well explained Hibernate article on JavaLobby web site authored by R.J.Lorimer and since Hibernate is on my interest list….and I belive yours too..I publish here a link to it. Thank you, R.J.


Discover more from Liviu Nastasa

Subscribe to get the latest posts sent to your email.

Unknown's avatar

Author: Liviu Nastasa

Passionate about software development, sociology, running...definitely a geek.

One thought

  1. I had the same problem. Hibernate documentation gives us a description of the two approaches. I chose the clean 2 tier/closed session approach, implemented mainly with Criteria not with Query, because you can state clearly the FetchMode you want for your members/properties. It certainly has some disadvantages like:
    – eliminates the caching 😦 – a big performance hit here
    – forces you to fetch data even if you don’t need it OR complicates your data logic function (“To Fetch ..Or Not To Fetch? … That Is The Question” – HiberHamlet by HiberTitan + a guy named Shakespeare)

Leave a comment