• 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: Updating / Replacing Parent Objects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Updating / Replacing Parent Objects


  • Subject: Re: Updating / Replacing Parent Objects
  • From: Lotsa Cabo <email@hidden>
  • Date: Sun, 1 Aug 2004 17:45:07 -0400

On Aug 1, 2004, at 5:30 PM, Dirk Bajohr wrote:

> If you have a relationship between the two entities you
> can call removeObjectFromBothSidesOfRelationshipWithKey() and
> addObjectToBothSidesOfRelationshipWithKey(). If the relation is
> to-1 you only need to use the second method.
>
> myPost is the Post to be changed, newForum is your new Forum:
>
> myPost.addObjectToBothSidesOfRelationshipWithKey(newForum, "forum");
> myPost.editingContext().saveChanges();
> - or -
> newForum.addObjectToBothSidesOfRelationshipWithKey(myPost, "posts");
> newForum.editingContext().saveChanges();
>


Thanks for the reply, Dirk.  In your examples above are you assuming
that "removeObjectFromBothSidesofRelationshipWithKey()" has already
been called?  I notice you mentioned the method but did not include it
in either example.

R/S
Ryan
_________________________
Tired of spam?  Signup for a FREE SpamJammer.Com account and say
goodbye to junk email forever!
_______________________________________________
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.


  • Follow-Ups:
    • Re: Updating / Replacing Parent Objects
      • From: Dirk Bajohr <email@hidden>
References: 
 >Updating / Replacing Parent Objects (From: Lotsa Cabo <email@hidden>)
 >Re: Updating / Replacing Parent Objects (From: Dirk Bajohr <email@hidden>)

  • Prev by Date: Re: Updating / Replacing Parent Objects
  • Next by Date: GETDATE() in EO??
  • Previous by thread: Re: Updating / Replacing Parent Objects
  • Next by thread: Re: Updating / Replacing Parent Objects
  • Index(es):
    • Date
    • Thread