-->
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: Is optional one to one possible?
PostPosted: Wed Mar 09, 2011 7:18 am 
Newbie

Joined: Tue Mar 08, 2011 3:55 pm
Posts: 6
I have a one to one relationship between 2 tables:

TABLE_A
TABLE_B

Table A has a generated primary key.
Table B's primary key is also foreign key to table A.

Table B is optional

I also have Objects:

ObjectA
ObjectB

How do I model this in xml file?

Also, Preferably I do not want to store an ID property on ObjectB. The fact that it is a child of ObjectA and that it's database key is same as that of ObjectA should be enough to be able to maintain the key field.

Is this possible to configure?


thanks in advance


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.