-->
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: Mapping columns! Urgent!!!
PostPosted: Mon Aug 15, 2005 11:43 pm 
Newbie

Joined: Thu Aug 04, 2005 10:58 am
Posts: 4
Hello there,

I am new to hibernate.

I have two table A & B.

Table A (C1_id, C2_id, A3);
Table B (C1_id, C2_id, C3_id, B4, B5);

With C1_id, C2_id, C3_id are primary columns.

I used composite-id for column C1_id & C2_id of table A.

What am I supposed to do for mapping table B to A?

Anyone please help.

Thank you very much.


tbluong.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 16, 2005 12:19 am 
Newbie

Joined: Fri Apr 08, 2005 6:28 pm
Posts: 17
Location: US
It really depends on what you mean by "mapping".
I would recommend you specifying class (class="xxx") for composite id.

Class B can reference class A using multiple column elements in many-to-one or collection key...

See section 9.4 in Hibernate reference.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 16, 2005 1:39 am 
Newbie

Joined: Thu Aug 04, 2005 10:58 am
Posts: 4
Hello Dmitri Rasnitsyn,

Thank you so much for your input.

The problem is solved.

I really appreciate your help.


tbluong.


Top
 Profile  
 
 Post subject: Suggestion
PostPosted: Tue Aug 16, 2005 3:33 am 
Beginner
Beginner

Joined: Wed Jan 19, 2005 6:07 am
Posts: 20
tbluong wrote:
Hello Dmitri Rasnitsyn,

Thank you so much for your input.

The problem is solved.

I really appreciate your help.


tbluong.



Since the reply you got, apparently helped solving the problem, You should rate it in order to make the credit-system work. :)


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.