We have a BasePlan table. Ccs7307Plan extends from that table.
BasePlan.hbm.xml has a <joined-subclass> attribute as follows:
================BasePlan.hbm.xml=================
<class
name="org.tiaa.ccs.persistence.BasePlan"
table="CCS_TL_BASE_PLAN"
>
......
<joined-subclass name="org.tiaa.ccs.persistence.inst7307.Ccs7307Plan" table="CCS_TL_7307_PLAN">
<key column="PLAN_ID"/>
<many-to-one
name="ccs7307PlanLkup"
class="org.tiaa.ccs.persistence.inst7307.lookup.Ccs7307PlanLkup"
not-null="true"
>
<column name="LOOK_UP_ID" />
</many-to-one>
</joined-subclass>
</class>
=====================================
Ccs7307Plan has a many-to-one relationship with Ccs7307PlanLkup with LOOK_UP_ID.
In the Java code, I have established bidirectional relationship between Ccs730Plan and Ccs7307lanKkup as follows:
/****************************************************
ccs7307Plan.setCcs7307PlanLkup(ccs7307PlanLkup); //chlild.set(Parent)
ccs7307PlanLkup.getCcs7307Plans().add(ccs7307Plan);//Parent.getChildren.add(child)
****************************************************/
//////////////////////Error I get://///////////////////////////////////////////
150062 [main] ERROR net.sf.hibernate.util.JDBCExceptionReporter - ORA-01400: cannot insert NULL into ("CCS01"."CCS_TL_7307_PLAN"."LOOK_UP_ID")
///////////////////////////////////////////////////////////////////
Any recommendations are highly appreciated!
Email:
uarif@tiaa-cref.org