-->
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: Nonprimary foreign key
PostPosted: Mon Feb 25, 2008 3:36 am 
Newbie

Joined: Mon Feb 25, 2008 3:27 am
Posts: 1
Hi All,

My requirement is to have 1 unique Non Primary key act as a Foreign key :

Table A Table B
Field1 PK Field1 PK
Field 2 UQ---------------->Field2
Field3 Field3

Any Idea Does Hibernate support this kind of relationship ?
Since while adding data into TableB Its taking Field1 of TableA instead of taking Field2.

Many Thanks in advance!!!


Best Regards,
Anuj


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 25, 2008 1:09 pm 
Expert
Expert

Joined: Fri Aug 19, 2005 2:11 pm
Posts: 628
Location: Cincinnati
ofcourse it does.

look at collections, and one-to-many and many-to-one

_________________
Chris

If you were at work doing this voluntarily, imagine what you'd want to see to answer a question.


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.