Hi,
I am getting the following exception when trying to get the size of a one to many relation in a PostLoad method. Of course, this code runs inside a SLSB DAO and should so be inside a transaction:
org.hibernate.LazyInitializationException: failed to lazily initialize a collection, no session or session was closed at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:358) at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.java:350) at org.hibernate.collection.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:97) at org.hibernate.collection.PersistentSet.size(PersistentSet.java:139) at com.servengine.contentmanager.CMCategory.postLoad(CMCategory.java:52)