I have been struggling with this for a whlle. I have the following HQL:
and it seems to work OK (I think). When I try and access the prosocPermissions objects using:
SELECT prosocUser FROM ProsocUser AS prosocUser LEFT JOIN FETCH prosocUser.prosocPermissions WHERE prosocUser.userId = :userId
I get the error:
I know this is being thrown because the hibernate session has been closed but I can't figure out the solution to it. I am using:
org.hibernate.LazyInitializationException: could not initialize proxy - no Session
and I think that means that the session is closed before processing gets to the view stage which is where I am trying to access the hibernate proxy object. I have however tried to use:
but to no effect.
Can anyone help me out?