-->
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 id of 2 other composite ids
PostPosted: Mon Jan 09, 2006 3:08 am 
Newbie

Joined: Mon Jan 02, 2006 6:54 am
Posts: 4
hello,

can we have a composite id composed of two other composite ids?

like:

<composite-id name="id" class="objects.edgeID">
<key-many-to-one name="SRC_NODE_ID" class="objects.nodeID">
<column name="SRC_NODE_ID"/>
<column name="SRC_GRAPH_ID"/>
</key-many-to-one>
<key-many-to-one name="DST_NODE_ID" class="objects.nodeID">
<column name="DST_NODE_ID"/>
<column name="DST_GRAPH_ID"/>
</key-many-to-one>
</composite-id>

I have an edge object with a composite id of edgeID. this edgeID is composed of two other nodeID objects, where nodeID is also composite key for object node.

with the above mapping I get the error:

An association from the table EDGES refers to an unmapped class: objects.nodeID

objects.node.ID is unmapped but from node.hbm.xml:

<class name="objects.node" table="NODES">

<composite-id name="id" class="objects.nodeID">
<key-property name="GRAPH_ID" type="java.lang.Integer">
<column name="GRAPH_ID" not-null="true" />
</key-property>
<key-property name="SURROGATE_ID" type="java.lang.Long">
<column name="SURROGATE_ID" not-null="true" />
</key-property>
</composite-id>

how am i supposed to do this? am i supposed to create a mapping for the nodeID class?

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.