posted 16 years ago
So I would like to store an entity bean, User in session. However, the lazily loaded properties will not be automatically loaded and I am getting LazyInitializationException when pulling the user back from the session on subsequent requests. What is the best method of dealing with this? I guess it would be ok to call a method (if there is one) that would go ahead and pull all lazily loaded members (to a depth of 1 I guess). I am using Spring HibernateDaoSupport / HibernateTemplate to access Hibernate.
Also, I do have OpenSessionInViewFilter configured. But, I suspect that even that will not fix this problem.