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: Chuck Hill <email@hidden>
- Date: Fri, 19 Sep 2008 13:20:57 -0700
On Sep 19, 2008, at 12:34 PM, Florijan Stamenkovic wrote:
On Sep 19, 2008, at 14:56, Chuck Hill wrote:
On Sep 19, 2008, at 11:52 AM, Florijan Stamenkovic wrote:
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?
Yes, that is what I was thinking of. If it is not really a to-
many, why not put the PK of B into A as a FK?
That would just reverse the situation into A <<-> B, no? What I need
to is an enforced A <-> B, and in that B -> A is mandatory, and A ->
B as optional.
I was thinking more of having A and B each have the other PK as a FK.
Though this may irritate EOF when it tries to look up inverse
relationships. You can tell EOF what to do by implementing String
inverseForRelationshipKey(String relationshipKey) on A and B.
Chuck
--
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