radu wrote:
No, has nothing to do with your code layering. In order to have lazy loading working you have to keep the session open after your first initial loading of the object. I also suspect that you are "swallowing" an exception there this is why you end up only with empty collections.
cheers,
radu
Thanks for your reply.
I stepped through the code and enumerate one of the collection right after loading and display the output to the console just to make sure that the session is open. As expected the collection is not populated and the session is open.
I also enclosed the loading with the try catch block and display to the console whatever exception was thrown unfortunately there was no exception that was being thrown out.