I"m trying to use Hibernate 3 with Spring. I've got two classes with a unidirectional parent-child relationship: QuestionnaireResponse and Answer. A QuestionnaireResponse has a child Set of Answers. I've attached the Hibernate mapping below (just to keep the narrative together).
Of course I'm writing JUnit tests. I've got a test where I query for a particular QuestionnaireResponse and check the result I get back. The query is returning the right response for a given individual, but when I check to see if the associated answers are included I find that the Set size is zero instead of the 24 I expected from the database values.
I've set it up so I'm using eager loading. What did I miss with Hibernate? Why is it not getting the assocated Answers in this simple 1:m relationship? Thanks.