Description of the issue:
Encountered a problem with how lazy loaded collections were workng. When I
request collection data in the processing I'm getting:
{{{
org.hibernate.LazyInitializationException: failed to lazily initialize a
collection of role: ..., no session or session was closed
}}}
I've found that there's no session in hibernate's PersistentBag I access. I've
tried to mark method as @Transactional and it worked to my confusion.
I really dislike the solution as my *data-reading* method may now modify
underlying data as a side-effect.
Steps to reproduce:
1. Create a class with lazily loaded collection (N-N in my case).
2. Query the data so the lazily loaded collection field wasn't fetched
3. Try to iterate over collection
4. org.hibernate.LazyInitializationException is thrown
Guice-Persist 3.0
Hibernate 3.6.10.
Original issue reported on code.google.com by alex.che...@gmail.com on 19 Aug 2013 at 3:18
Original issue reported on code.google.com by
alex.che...@gmail.com
on 19 Aug 2013 at 3:18