-->
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: one-to-one associations - need help
PostPosted: Mon Sep 12, 2005 3:39 pm 
Newbie

Joined: Mon Sep 12, 2005 3:36 pm
Posts: 5
Hi,

I would like to map a one to one association between the Tickler and Demographic table

tickler
--------
tickler_no PK
demographic_no
....


demographic
---------------
demographic_no


All the examples i found don't allow you to use the (demographic_no) as the column which maps the relation as apposed to the PK.

I've only been able to map this relation as a one to many set which isn't exactly what i want.


thanks


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 12, 2005 8:26 pm 
Red Hat Associate
Red Hat Associate

Joined: Mon Aug 16, 2004 11:14 am
Posts: 253
Location: Raleigh, NC
You need to use a many-to-one. Even if a demographic is used for only one tickler, the relational semantics are many-to-one, not one-to-one. This confuses many people in the beginning (myself included).

Don't forget to rate.

-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.