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%20Reference%20Library/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 protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to