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: *** many-to-many link table with childs ***
PostPosted: Thu Aug 28, 2008 5:16 am 
Newbie

Joined: Tue Jun 10, 2008 12:39 pm
Posts: 14
Hi,

Table 1:

Name : Account
Columns: account_id
account_name

Table 2:


Name: Field
Columns : field_id
field_name

Account and Field => many-to-many association

link table:

name : account_field
columns : account_id
field_id


Link Table(account_field) has got a child account_field_child

Link Table Child :

Name : account_field_child
Columns :account_id
field_id
account_field_childname
account_field_childdescription

Queries :


1) Do I need to go for a .hbm.xml for the link table;because I need to cascade delete the account_field_child whenever a row is deleted in account_field.

2)I want to maintain unidirectional many-to-many relationship from account to field;so how to cofigure <set> in Account to specify link table in this scenario.

can u please explain with configuration mappings ...

Thanks
Babu


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.