Re: Can't get automatic inverse relationships to work
Re: Can't get automatic inverse relationships to work
- Subject: Re: Can't get automatic inverse relationships to work
- From: Mike Schrag <email@hidden>
- Date: Thu, 9 Oct 2008 07:57:32 -0400
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 ...
ms
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden