On Jan 15, 2010, at 10:00 pm, Jenny M wrote: > I guess my question is also, was there any easier way to do it?? Is that how > it's normally done? > It's not clear exactly what you're referring to. Do you mean, is the typical pattern that which you described earlier, namely:
> I've been setting it using key-value coding: [object setValue:mySet > forKey:categories] > No, that's not how the documentation recommends that you do it. "Core Data automatically generates efficient public and primitive get and setaccessor methods for modeled properties (attributes and relationships) of managed object classes (see “Managed Object Accessor Methods”). When you access or modify properties of a managed object, you should use these methods directly." [...] "Typically, however, you do not want to set an entire relationship, instead you want to add or remove a single element at a time. To do this, you should use mutableSetValueForKey: or one of the automatically-generated relationship mutator methods (see “Dynamically-Generated Accessor Methods”):" mmalc _______________________________________________ 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