I have an element:
Code:
<class name="Enroll" table="enroll">
<composite-id>
<key-many-to-one name="student" column="student_id" class="Student"/>
<key-many-to-one name="module" column="module_code" class="Module"/>
</composite-id>
<property name="enrollDate" column="enroll_date" type="date"/>
</class>
I'll like to attach a set of "Result" to the Enroll class which has student_id, and module_code as foreign key. I tried using <key><column>... but didnt work. Like:
Code:
<set name="results" lazy="true" inverse="false" table="result">
<key>
<column name="student" column="r_student_id"/>
<column name="module" column="r_module_code"/>
</key>
<one-to-many class="Result"/>
</set>
How could I define the <set>?
[/code]