-->
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.  [ 4 posts ] 
Author Message
 Post subject: Regarding Composite key
PostPosted: Mon Oct 03, 2005 6:29 am 
Beginner
Beginner

Joined: Fri Aug 12, 2005 7:05 am
Posts: 25
Location: TamilNadu
Hi All!
I am new for hibernate,I have some struggle in mapping file.aspecially in key mapping.

Here now i want know how to use more primary key(composite key) for a single table.
Note: i have used assigned generator class


Thx in Advance
Shanmugam


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 03, 2005 9:33 am 
Expert
Expert

Joined: Fri Aug 19, 2005 2:11 pm
Posts: 628
Location: Cincinnati
look up the

<composite-id>

tag

_________________
Chris

If you were at work doing this voluntarily, imagine what you'd want to see to answer a question.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 03, 2005 12:47 pm 
Beginner
Beginner

Joined: Fri Aug 12, 2005 7:05 am
Posts: 25
Location: TamilNadu
Hi !

i want full details abt it bcz i already used <composite-id>.But mapping file didn't loaded when server started.

thx


kochcp wrote:
look up the

<composite-id>

tag


Top
 Profile  
 
 Post subject: see the examples
PostPosted: Mon Oct 03, 2005 5:03 pm 
Newbie

Joined: Thu Mar 17, 2005 8:15 pm
Posts: 19
(1)
<composite-id name="comp_id" class="com.tollbrothers.archonline.dto.common.OrderHistoryPK">

<key-property
name="orderNumber"
column="OrderNumber"
type="java.lang.Integer"

/>
<key-property
name="modifiedDate"
column="ModifiedDate"
type="java.util.Calendar"

/>
</composite-id>

(2)
<composite-id name="comp_id" class="ChildPK">

<key-many-to-one
name="parent"
column="id"
class="Parent"
/>
<key-property
name="stateCode"
column="stateCode"
type="java.lang.String"

/>
</composite-id>


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

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.