-->
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: Child object composite-id contains column name of Parent pk
PostPosted: Tue Oct 16, 2012 5:16 pm 
Newbie

Joined: Thu Jan 18, 2007 11:28 am
Posts: 5
I have two objects. Both objects have composite pk.
<class name="parent" table="t_parent">
<composite-id>
<key-property name="effDt" type="date" column="EFF_DT">
</key-property>
<key-property name="group" type="int" column="GROUP"></key-property>
</composite-id>
<many-to-one
name="group"
class="GroupTable"
cascade="none"
outer-join="auto"
>
<column name="EFF_DT" />
<column name="GP_ID"/>
</many-to-one>
</class>
<class name="GroupTable" table="t_group">
<composite-id>
<key-property name="effDt" type="date" column="EFF_DT">
</key-property>
<key-property name="group" type="int" column="GRP_ID"></key-property>
</composite-id>

<property
name="lastUpdateDate"
type="java.util.Date"
column="LST_UPDT"
/>
</class>

When I try to start my server, I get this error:
Repeated column in mapping for entity EFF_DT (should be mapped with insert="false" update="false").
But when I add insert="false" update="false" it complained that insert and update is not in the dtd for < key-property> and <column>

Can someone please help?

Thanks


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.