Quote:
does yield TestEssay objects; but the TestObject with essay_id = 0
also has a Student object whose student_id = 0;
Can you be more clear on the quoted text?
Also from your post you say ur mapping file has
Code:
<set name="students" table="essay_x_student">
<key column="STUDENT_ID" not-null="true"/>
<one-to-many class="marker.bean.Student" />
</set>
The above mapping snippet says - "relate essay with essay_x_student using the student_id"... But I guess it should be
"relate essay with essay_x_student using the essay_id column"
i.e.,
Code:
<set name="students" table="essay_x_student">
<key column="ESSAY_ID" not-null="true"/>
<one-to-many class="marker.bean.Student" />
</set>