Hello, im using Hibernate3.1.3 with Spring2.0. Also im using last version of annotations, but i have a problem, i always close the session at the end of the transaction (using Spring Interceptor), but when i try to retrieve a collection the exception:
Code:
org.hibernate.LazyInitializationException - failed to lazily initialize a collection of role: com.dg.dg59.archival.model.staticinformation.User.privileges, no session or session was closed
is thrown. I know why this is happening, so in OneToOne and in classes attributes i used the annotated @Proxy(lazy=false) and because all data is loaded, the problem doesn't persists.
The problem is with collections, although im using FetchStrategy.EAGER, the exception is thrown. Can anybody tell me how to use Annotations for a lazyless approach?.
Thank you very much.