-->
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: Mapping documents: Newbie question about foreign keys
PostPosted: Thu Sep 14, 2006 8:09 pm 
Newbie

Joined: Thu Sep 14, 2006 7:59 pm
Posts: 2
Hey,

How do I map(reference) the non-primary unique key of a table (e.g A) as a foreign key through the mapping files?

Most of the documentation I found was for referencing the primary key. Could not find it clearly mentioned anywhere.

Any help would be appreciated.

Thx.


Top
 Profile  
 
 Post subject: define many-to-one
PostPosted: Thu Sep 14, 2006 8:39 pm 
Newbie

Joined: Mon Aug 01, 2005 8:12 pm
Posts: 19
Location: CA
YOu need to define set for your foreignekey object as follows
by defining many to one relationship.

see below sample:
<many-to-one
name="auditReadings"
class="com.wipro.domain.AuditReadings"
cascade="none"
outer-join="false"
update="true"
insert="true"
column="AUDIT_READING_KEY"
/>


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.