Re: Propagate Primary Key Confusion?
Re: Propagate Primary Key Confusion?
- Subject: Re: Propagate Primary Key Confusion?
- From: Art Isbell <email@hidden>
- Date: Sun, 16 Jan 2005 18:51:32 -1000
On Jan 16, 2005, at 4:05 PM, Kieran Kelleher wrote:
I have a account entity with a to-one relationship to ccInformation
joined on both primary keys.
I have modeled the account.ccInformation relationship as:
Optionality: Optional
Delete Rule: Cascade
Propagate Primary Key checked
Owns Destination checked
When I create an account EO, a ccInformation EO is AUTOMATICALLY
created! I don't want this to happen .... it's optional! Is this
supposed to happen?
Think about it. A to-one relationship must have one and only one
related object if its foreign key value is not null. But because the
foreign key is the primary key of the source object, it cannot be null.
Therefore, you cannot have an optional primary key to primary key
to-one relationship. However, you can model such a relationship (see
below).
So, for "optional to one" is my only choice a foreign key in account
pointing to ccInformation?
In addition to that option,
http://developer.apple.com/documentation/LegacyTechnologies/WebObjects/
WebObjects_4.5/System/Documentation/Developer/EnterpriseObjects/
DevGuide/EOsII2.html discusses other options.
Aloha,
Art
_______________________________________________
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