On 09/10/2008, at 10:57 PM, Mike Schrag wrote:

Uh... the whole point of the inverse relationship updating was that you could say setAvatar() or addToAvatars() and if would update the reverse for you? Since when is the code below needed now? I'd never want a method that calls itself "setFooRelationship" as an extra to setFoo().
iPhone development is rotting your brain! :)

But yes, I agree ... The problem he had is that he is using the old eogen templates that didn't even have a setAvatar(..) method generated. In the old templates there was ONLY a setAvatarRelationship method (which came from the way way back original templates that all of these were based on -- I forget who originally wrote it), which did an addObjectToBothSides. In the new ones, both methods are supported for backwards compatibility (I had thousands of lines of code that used the setXxxRelationship variant). In the new templates, if you call setXxxRelationship and you do not have inverse updating on, it will behave exactly as it did. If you call it when you DO have inverse relationship updating on, it will simply call through to the straight setXxx method, and in addition, you can just now simply call the setXxx method directly (and bind things to it) and it will "do the right thing". So in the new way, you could completely remove your code that calls setXxxRelationship, and those methods could be deprecated. They're only still around to make it easier on people transitioning ...

That's good to know. I can only assume that the old code was attempting to avoid an infinite loop.

with regards,
--

Lachlan Deck

_______________________________________________
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