Im working with a legacy database and an application written for Apple WebObjects and migrating that to Hibernate.
I'm trying to map a many to one relationship and also its join attribute. But Hibernate gives "Repeated column in mapping" error if i try to do that, unless i make one of it readonly.
But the application written in WebObjects requires both to be writable. Is there a way around this?
Example:
<class name="Student" table="students">
<property name="deptCode" column="dept_code" type="string">
<many-to-one name="department" class="Department">
<column name="dept_code"/>
</many-to-one>
</class>