Joined: Thu May 11, 2006 5:00 pm Posts: 5
|
I have a table Telephone Address that has a foreign key to itself (Telephone Address Parent). The foreign key is nullable.
I am not able to save a simple Telephone Address entity because of the many to one relationship with the Foreign key. When I comment the same, it works (which is not ideal). Can someone help?
Below is the hibernate xml
<hibernate-mapping>
<class name="com.albertsons.components.centraltelecom.hibernate.vo.TelephoneAddressHibernate" table="TELEPHONE_ADDRESS">
<many-to-one name="telephoneAddress" class="com.albertsons.components.centraltelecom.hibernate.vo.TelephoneAddressHibernate" fetch="select">
<column name="TELEPHONE_ADDRESS_PRNT_ID" precision="22" scale="0" />
</many-to-one>
<set name="telephoneAddresses" inverse="true">
<key>
<column name="TELEPHONE_ADDRESS_PRNT_ID" precision="22" scale="0" />
</key>
<one-to-many class="com.albertsons.components.centraltelecom.hibernate.vo.TelephoneAddressHibernate" />
</set>
</hibernate-mapping>
I am using Hibernate 3.1 beta4 and Oracle 9i
Thanks
|
|