Re: Help with understanding relationships
Re: Help with understanding relationships
- Subject: Re: Help with understanding relationships
- From: Chuck Hill <email@hidden>
- Date: Sat, 11 Oct 2003 20:21:16 -0700
Hi Arturo,
At 11:03 PM 11/10/2003 -0400, Arturo Pirez wrote:
>
>On Saturday, October 11, 2003, at 10:48 PM, Chuck Hill wrote:
><lots of good stuff on addObject<blah><blah> :-)
>
:-)
>Here's a question I have about this. How does EOF know what the
>inverse relationship is?
>
It doesn't, always. AFAIK, it gets it from the EORelationship method
public EORelationship inverseRelationship()
Which is documented to "Searches the relationship's destination entity for
a user-created, back- referencing relationship joining on the same keys.
Returns the inverse relationship if one is found, null otherwise".
So if the inverse is modeled on different keys (funky, but maybe possible)
or if there is more than one back pointing relationship on the same keys
then it might not find it or might return the wrong one.
>The reason I ask is because it doesn't always seem to work.
Its been a long time since I've had a problem with this but I recall having
one at some point...
>Is it because I manually added
>a relationship rather than do the control-drag thing?
>
Manually added in EOModeler or in code?
>Or is it because I like to rename things?
>
I wouldn't think so, unless your model has become inconsistent.
Sorry, not much help here.
Chuck
--
Chuck Hill email@hidden
Global Village Consulting Inc. http://www.global-village.net
_______________________________________________
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.