I am having trouble finding documentation on how to use HQL to lookup values from a composite foregn key.
looking at the mapping document below i have a person class which has a composite id. i want to look up a list of EFTInfo's that are linked to that person.
I can load the person object fine as i have the ID's
How can i lookup the EFTInfos from that point or where would i find this documentation.
should i have some dort of reverse mapping in my person hbm.xml?
Mapping documents:
Code:
<class name="EftInfo" table="eft_info">
<composite-id name="Id" class="ID">
<key-property name="Id" column="eft_info_id" type="int" />
<key-property name="DataBaseID" column="eft_info_db_id" type="int" />
</composite-id>
<many-to-one class="person" name="person">
<column name="person_id"/>
<column name="person_db_id" />
</many-to-one>
<property name="Description" column="descr" type="AnsiString" length="60" not-null="true"><!-- [descr] [varchar] (60) --></property>
</class>