• 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
Re: Can't get automatic inverse relationships to work
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Can't get automatic inverse relationships to work
      • From: Lachlan Deck <email@hidden>
References: 
 >Can't get automatic inverse relationships to work (From: Fredrik Lindgren <email@hidden>)
 >Re: Can't get automatic inverse relationships to work (From: Mike Schrag <email@hidden>)
 >Re: Can't get automatic inverse relationships to work (From: Anjo Krank <email@hidden>)

  • Prev by Date: Confusing lock error solved, but now a restoreSessionWithID lock issue
  • Next by Date: Aaargh, ERXApplication!
  • Previous by thread: Re: Can't get automatic inverse relationships to work
  • Next by thread: Re: Can't get automatic inverse relationships to work
  • Index(es):
    • Date
    • Thread