Hello Spring/Hibernate Gurus!
in a time like this i would like you to be my best friends.I am working on a project using hibernate 3.6.1.Final JPA implementation using s
The scope of the transaction (and hence the session) is only around the getContentsbyCategoryID()
method. Once you return from it, the transaction is committed and the session is closed. Where, exactly, is it throwing the exception? Is it on the list()
operation inside getContentsbyCategoryID()
? Or is it, in fact, after you have returned from getContentsbyCategoryID()
and trying to access the lazy collection somewhere else in the code? In that case, you either have to
getContentsbyCategoryID()
(by calling size()
on it, for instance)