Re: uniqueness constraint on an a foreign key
Re: uniqueness constraint on an a foreign key
- Subject: Re: uniqueness constraint on an a foreign key
- From: Florijan Stamenkovic <email@hidden>
- Date: Fri, 19 Sep 2008 14:52:51 -0400
On Sep 19, 2008, at 13:26, Chuck Hill wrote:
If the relationship is mandatory, I'd use the PK.
As in propagate PK? That does not work in this case because there can
be A rows that do not have any related B rows.
Or did you mean something else?
F
On Sep 19, 2008, at 10:00 AM, Florijan Stamenkovic wrote:
Hi all,
I have a relationship A <->> B. B carries the FK for A, not
allowed to be null.
I'd like to enforce that a single A can relate to only one B so
I'm thinking of putting a uniqueness constraint on the FK. As far
as I can see that will give me what I want without causing any
trouble. Can anyone think of a reason against doing this, or is
there a better practice to address this?
Thanks,
F
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40global-village.net
This email sent to email@hidden
--
Chuck Hill Senior Consultant / VP Development
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden