Re: Updating / Replacing Parent Objects
Re: Updating / Replacing Parent Objects
- Subject: Re: Updating / Replacing Parent Objects
- From: Lotsa Cabo <email@hidden>
- Date: Tue, 3 Aug 2004 21:41:13 -0400
On Aug 3, 2004, at 10:45 AM, Dirk Bajohr wrote:
> aPost has a to-1 relationship to (= is in) aForum1 - you want to move
> aPost to aForum2
>
> What to do:
> 1 aPost.removeObjectFromBothSidesOfRelationshipWithKey(aForum1,
> "forum");
> 2 aPost.addObjectToBothSidesOfRelationshipWithKey(aForum2, "forum");
> 3 aPost.editingContext().saveChanges();
> Ann.: if the relationship really is to-1 you can omit Step 1
Dirk,
Thanks! Much nicer than what I WAS doing. ;-)
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.