-->
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: composite key error
PostPosted: Sun Aug 26, 2007 7:48 am 
Newbie

Joined: Mon Aug 20, 2007 5:18 am
Posts: 8
I am getting error message
An association from the table GroupMember refers to an unmapped class: GroupMemberId.

<hibernate-mapping>
<class name="GroupMember" table="groupmember">
<composite-id name="id" class="GroupMemberId">
<key-many-to-one name="groupid" class="Group" column="groupid"/>
<key-many-to-one name="memberid" class="Member" column="memberid"/>
</composite-id>
</class>
</hibernate-mapping>

<hibernate-mapping>
<class name="Group" table="group">
<id name="id" type="java.lang.Integer">
<column name="id" />
<generator class="increment"></generator>
</id>
<property name="name" type="java.lang.String">
<column name="name" length="45" not-null="true" />
</property>
<property name="status" type="java.lang.Short">
<column name="status" not-null="true" />
</property>
<many-to-one name="member" column="memberid" not-null="true">
</many-to-one>
<set name="groupposts" inverse="false">
<key column="groupid"/>
<one-to-many class="GroupPost" />
</set>

<list name="groupmembers" table="GroupMember">
<key column="groupid"/>
<list-index column="memberid"/>
<composite-element class="GroupMember">
<many-to-one name="id" column="memberid"/>
</composite-element>
</list>
</class>
</hibernate-mapping>


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.