• 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
Help with understanding relationships
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Help with understanding relationships


  • Subject: Help with understanding relationships
  • From: Ray Ackland <email@hidden>
  • Date: Sat, 11 Oct 2003 22:14:34 +1300

I have been reading though the API reference material, and am suffering a little confusion when reading about some relationship functions.

Firstly, can someone tell me what is the difference between the two methods addObjectToPropertyWithKey(Object eo, String key) and includeObjectIntoPropertyWithKey(Object eo, String key) and the corresponding pair of exclude... & remove....

Also, when the documentation talks about "Adds to the relationship named key the object eo without setting inverse relationships", I am thinking there is something I don't understand about relationships.

I always thought that two objects would be related if the shared the same value in the relevant keys. In a one-to-many relationship the primary key of the first entity equals the foreign key in the target entity. If this is correct, how does an object get removed from one side of the relationship without affecting the reverse?

If A<->>B then a.primaryKey = b.foreignKey. I assume this relationship would be broken by changing b.foreignKey to match some other value or null. Wouldn't that break the relationship in both directions?

What is it I am overlooking?

Ray.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Help with understanding relationships
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Re: The conection dictionary at "start-up"
  • Next by Date: Best way to update relationships on fetch
  • Previous by thread: Re: Grumbling McCreyekes
  • Next by thread: Re: Help with understanding relationships
  • Index(es):
    • Date
    • Thread