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: Child table of Secondary Table
PostPosted: Wed Jul 16, 2008 4:44 am 
Newbie

Joined: Fri Feb 29, 2008 7:05 am
Posts: 13
Location: New Delhi, India
Hi All.

I have a design problem and I am not aware how I can achieve this. I am using the Hibernate annotations support.

I have created one Secondary table and now I want to associate another table i.e. child to this secondary table only. My current configuration has made the association between the child table and the Primary table.

Please let me know how I can acheive my objective, if it is possible. My configuration is like this:

Secondary Table:
Code:
@Entity
@SecondaryTable(name = "secondary_table", pkJoinColumns = { @PrimaryKeyJoinColumn(name = "secid", referencedColumnName = "id") })
@DiscriminatorValue("contact")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)


Child Table:
Code:
@Entity
@Table(name = "child_table")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)


Best Regards,
Nitin


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.