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 Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s