-->
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: one-to-one mapping question
PostPosted: Fri Oct 28, 2005 1:59 pm 
Newbie

Joined: Fri Oct 28, 2005 1:46 pm
Posts: 1
hi
I am using Hibernate 3.0 and had the following question

Does hibernate support the following?

1) one-to-one foreign key association if the foreign key is also a primary key or is part of a composite primary key.

For instance I have a table Transaction where primary key is

TransactionId

and I have a table Payment which has a composite primary key composed of

TransactionId and PaymentId.

If I want a one-to-one relationship between Transaction and Payment can I define TransactionId as a foreign-key in a <one-to-one> hibernate mapping?

2) one-to-one primary key association from a table with a single unqiue primary key to a table with a composite primary key and vice versa.
Taking the same example above can I define TransactionId as property-ref in a <one-to-one> hibernate mapping.

Thanks much
Jaya


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 26, 2008 12:18 pm 
Newbie

Joined: Fri Jun 15, 2007 2:32 pm
Posts: 16
I am also interested in an answer for the first question
Please answer...


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 28, 2008 6:06 am 
Beginner
Beginner

Joined: Mon Jan 21, 2008 8:57 am
Posts: 20
I am interested in an answer as well.


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.