Re: setValue:forKey: and to-many relationships
Re: setValue:forKey: and to-many relationships
- Subject: Re: setValue:forKey: and to-many relationships
- From: Keary Suska <email@hidden>
- Date: Thu, 22 Apr 2010 14:39:52 -0600
On Apr 22, 2010, at 2:28 PM, Dave DeLong wrote:
> I'm working with some NSManagedObjects and relationships between them. When my code runs, I generate the appropriate key based on the data that I'm parsing. For non-relationship attributes, I can simply do:
>
> [myManagedObject setValue:aValue forKey:key];
>
> My question is about to-many relationships. According to the Key-Value Coding guide, Core Data will generate an "add<Key>Object:" method for me. I was wondering if there was a way I could add an object to this relationship without having to build the selector, kind of like an "addObject:forKey:" method.
>
> Does a method like that exist? (I couldn't see on in the docs) Or do I get to build the selector myself?
-mutableSetValueForKey:
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden