hello~
i'm having trouble trying to setup a many-to-one relationship between two tables in my database. my mapping is basically setup like this:
Code:
<class name="ForeignTbl" table="foreign_tbl">
<id name="foreignID" column="foreign_id" type="integer">
<generator class="native">
</id>
<property name="foreignKeyToOtherTbl" column="foreign_key_to_other_table" type="integer" not-null="true" />
<many-to-one name="PrimaryTbl" property-ref="foreignKeyToOtherTbl" column="primaryID" class="primaryclass" not-null="true" lazy="false" />
</class>
i thought this would be fairly straight-forward with the many-to-one describing the relationship between the "many" table described here and the "one" table with the property-ref describing the column (or property) that relates the "many" table to the "one" table and the column attribute describing the column in the "one" table being related to...
is this not correct?