Help with understanding relationships
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.