-->
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: table copy
PostPosted: Sun Nov 26, 2006 12:20 pm 
Newbie

Joined: Sun Nov 26, 2006 12:07 pm
Posts: 1
I have Table A associated one-to-many to Table B.
I need Table B to have all attributes/columns from Table A.
How to do that in Hibernate?

Thanks in advance,


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 27, 2006 2:03 am 
Senior
Senior

Joined: Sat Jul 17, 2004 5:16 pm
Posts: 143
You are talking about the Object that represents Table B needs a reference to the Object that references Table A? That is a many-to-one relationship. If you have a one-to-many from A to B, then one of the relationships needs to have "inverse" which means it is not used in cascades. Anyways, search for examples of these, there are many.

Chris


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.