Joined: Sun Mar 22, 2009 5:20 am Posts: 6
|
Im working with a legacy database and an application written for Apple WebObjects and migrating it to Hibernate.
I'm trying to map a many to one relationship and its join column as a property. But Hibernate gives "Repeated column in mapping" error if i try to do that, unless i make one of them readonly with insert=false and update=false.
But the application written in WebObjects requires both to be writable. Is there any 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>
|
|