-->
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.  [ 3 posts ] 
Author Message
 Post subject: Help with sets and composite-ids needed !
PostPosted: Thu Feb 05, 2004 11:06 am 
Beginner
Beginner

Joined: Thu Feb 05, 2004 4:59 am
Posts: 23
Assume, we have following entity model:
Table "parent"
p_key_1: int (PK)
p_key_2: int (PK)
data_1: int
data_2: sring


Table "child"
c_key_1: int (PK) (FK)
c_key_2: int (PK) (FK)
c_key_3: int (PK)
data_1: int

Please, somebody help me to create hbm.xml files for each of this entity.
As you see, i need one-to-many association with composite primary and foreign keys.
I need also cascade child rows deletion.
I suppose, I have to use set's, but have no idea how to configure it with composite keys.

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 05, 2004 12:28 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
check the key-many-to-one on the child side

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 05, 2004 12:37 pm 
Beginner
Beginner

Joined: Thu Feb 05, 2004 4:59 am
Posts: 23
emmanuel wrote:
check the key-many-to-one on the child side

ok, what about sets ? where to define it and how to describe it correctly ?
Can anybody write short example ?


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