posted 18 years ago
OK, so here
you close the Session, then after that try to get the child data. But the CHild data is lazy loaded, meaning when you first get the Parent object, the children Collection in it is not loaded, it is empty. It is when you get the Collection and start going through it that Hibernate will get the data, but you closed the session, so Hibernate can't get the data.
So either 1. Set lazy loading to false, or 2. don't close the session till after you have read everything.
And remember to change your display name.
Mark