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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to