• 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: Basic EO question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Basic EO question


  • Subject: Re: Basic EO question
  • From: Art Isbell <email@hidden>
  • Date: Wed, 5 Apr 2006 08:45:28 -1000

On Apr 5, 2006, at 7:17 AM, Randy Wigginton wrote:

How do I set up an optional relationship from master to slave, such that the primary key from master (ID) is propagated into Slave?

From <file:///Developer/ADC Reference Library/documentation/WebObjects/UsingEOModeler/index.html>:

"A to-one relationship from one foreign key to a primary key must always have exactly one row in the destination entity—if this isn’t guaranteed to be the case, use a to-many relationship. This rule doesn’t apply to a foreign key to primary key relationship where a null value for the foreign key in the source row indicates that no row exists in the destination."

In your situation, the foreign key is the primary key of the source entity.  Because a primary key cannot be null, the relationship cannot be optional, so model it as a to-many relationship.

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:
    • Re: Basic EO question
      • From: Kieran Kelleher <email@hidden>
References: 
 >Basic EO question (From: "Randy Wigginton" <email@hidden>)

  • Prev by Date: Basic EO question
  • Next by Date: Re: Letting the user enter the compound primary key in D2W
  • Previous by thread: Basic EO question
  • Next by thread: Re: Basic EO question
  • Index(es):
    • Date
    • Thread