I am attempting to create a web application using Spring MVC, with Hibernate as its ORM layer. However, due to my inexperience with both frameworks I\'m struggling.
The Hibernate.initialize(list) call doesn't initialize the target entity objects that are referenced in the collection. You would need to iterate over reports and initialize each individual object. The call to initialize reports turns a proxy collection into a concrete collection of Report proxies. Try code below:
for(Report r : reports)
Hibernate.initialize(r);
The blunt axe approach is to turn off lazy loading by adding lazy="false" to your hbm classes. This might make sense if you will always iterate over the entire object every time its retrieved (make the initialization step OBE).