title: CoreData One-To-Many
body: <p>I have a core data mode that has 1 to many relationship, but i'm struggling to get the value e.g.</p>
  
  <p>Features.h model like this:</p>
  
  <pre><code>@interface Features : NSManagedObject
  
  @property (nonatomic, retain) NSString * name;
  @property (nonatomic, retain) NSString * version;
  @property (nonatomic, retain) NSNumber * expires;
  @property (nonatomic, retain) NSNumber * used;
  @property (nonatomic, retain) NSNumber * licenses;
  @property (nonatomic, retain) NSManagedObject *featureToProducts;
  @property (nonatomic, retain) NSSet *featureToUsers;
  @property (nonatomic, retain) NSManagedObject *featureToDaemons;
  @end
  
  @interface Features (CoreDataGeneratedAccessors)
  
  - (void)addFeatureToUsersObject:(NSManagedObject *)value;
  - (void)removeFeatureToUsersObject:(NSManagedObject *)value;
  - (void)addFeatureToUsers:(NSSet *)values;
  - (void)removeFeatureToUsers:(NSSet *)values;
  
  @end
  </code></pre>
  
  <p>And trying to access it like this:</p>
  
  <pre><code>Features *feature = (Features *)[[self.sectionInfoArray objectAtIndex:indexPath.section] features];
  NSLog(@"featureToUsers = %@", [feature.featureToUsers valueForKey:@"user"]);
  </code></pre>
  
  <p>NSLog shows:</p>
  
  <blockquote>
    <p>2011-09-28 01:06:59.719 Product Name[74092:fb03] featureToUsers = {(
        "david.wilson" )}</p>
  </blockquote>
  
  <p>I'm trying to populate a UITableViewCell but I keep getting:</p>
  
  <blockquote>
    <p>'NSInvalidArgumentException', reason: '-[__NSCFSet isEqualToString:]:
    unrecognized selector sent to instance 0x6b59a50'</p>
  </blockquote>
  
  <p>Thanks,
  dfox</p>