Hi..
I am trying to insert in to two tables which are in one-to-many mapping.
The parent table uses sequence for generating id. Now, Hibernate is not recognising the generated id in its subclass.
My hbm files looks as below...
Code:
<id name="alertId" type="java.lang.Long">
<column name="ALERT_ID" />
<generator class="native">
<param name="sequence">AS_ALERT_ID</param>
</generator>
</id>
<set name="asSendEmailAlertRequestses" table="EMAIL_ALERT_REQUESTS" cascade="all" inverse="true">
<key>
<column name="ALERT_ID" precision="22" scale="0" not-null="true" />
</key>
<one-to-many class="com.vodafone.upss.data.system.AsSendEmailAlertRequestsDO" />
</set>
Please help in this regard
Thanks in advance