• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Core Data Inverse To-Many/To-One Bug?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Data Inverse To-Many/To-One Bug?


  • Subject: Re: Core Data Inverse To-Many/To-One Bug?
  • From: mmalcolm crawford <email@hidden>
  • Date: Thu, 2 Jun 2005 01:27:43 -0700


On Jun 1, 2005, at 1:36 PM, Niko Matsakis wrote:

NSManagedObject *langobj = [array objectAtIndex:0];
[wordobj setValue:langobj forKey:@"language"]; // XXX
NSMutableSet *mutset = [langobj valueForKey:@"vocabulary"];
[mutset addObject:wordobj];
[...]
"2005-06-01 22:22:23.302 Flash[24497] *** -[_NSFaultingMutableSet objectAtIndex:]: selector not recognized [self = 0x34f960]

This suggests the problem is in the line before XXX. Where is 'array' coming from? My *guess* is that it's from a relationship? In which case it's a set, not an array...


NSMutableSet *mutset = [langobj valueForKey:@"vocabulary"];

Here you should be using 'mutableSetValueForKey:', not 'valueForKey:'.
<http://developer.apple.com/documentation/Cocoa/Reference/ CoreData_ObjC/Classes/NSManagedObject.html>


mmalc

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Core Data Inverse To-Many/To-One Bug?
      • From: Niko Matsakis <email@hidden>
References: 
 >Core Data Inverse To-Many/To-One Bug? (From: Niko Matsakis <email@hidden>)

  • Prev by Date: Re: Core Data Inverse To-Many/To-One Bug? [RESOLVED]
  • Next by Date: mutableSetValueForKey:, addObject:, and selector not found
  • Previous by thread: Re: Core Data Inverse To-Many/To-One Bug? [RESOLVED]
  • Next by thread: Re: Core Data Inverse To-Many/To-One Bug?
  • Index(es):
    • Date
    • Thread