-->
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.  [ 2 posts ] 
Author Message
 Post subject: composite-id (promary key and foreign key)
PostPosted: Wed Jul 01, 2009 1:41 pm 
Newbie

Joined: Wed Jul 01, 2009 1:13 pm
Posts: 2
composite-id (promary key and foreign key)

I have 3 tables

Table1(IDTB1,NAME)PK->IDFIELD

Table2(IDTB1,IDTB3,OPTION) PK(IDTB1,IDTB3) FK(IDT3) references Table3(IDT3)

Table3(IDTB3,TIPO)PK->IDTB3


I would like how to know write mapament O/R for table 2 ,I don't use annotations but xml for mapament O/R .
Other .

Another thing a composite key become a class ?

There is any example this mapament?


Top
 Profile  
 
 Post subject: Re: composite-id (promary key and foreign key)
PostPosted: Fri Jul 03, 2009 5:49 am 
Newbie

Joined: Wed May 27, 2009 6:10 am
Posts: 4
Yes, you have to map composite key in a class.

I've a similar situation (posted here: https://forum.hibernate.org/viewtopic.php?f=1&t=997141&p=2412341#p2412341) and I think to have found an hibernate bug in mapping composite id in one-to-many relationship.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.