-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Joined subclass has an association with another table!
PostPosted: Mon Jun 21, 2004 2:55 pm 
Newbie

Joined: Mon Jun 21, 2004 2:38 pm
Posts: 3
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.