• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Propagate Primary Key Confusion?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • How to fix "failed to provide new primary keys for..."?
      • From: Ken Tozier <email@hidden>
References: 
 >Propagate Primary Key Confusion? (From: Kieran Kelleher <email@hidden>)

  • Prev by Date: Re: Propagate Primary Key Confusion?
  • Next by Date: How to fix "failed to provide new primary keys for..."?
  • Previous by thread: Re: Propagate Primary Key Confusion?
  • Next by thread: How to fix "failed to provide new primary keys for..."?
  • Index(es):
    • Date
    • Thread