• 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: Missing Core Data selector
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Missing Core Data selector


  • Subject: Re: Missing Core Data selector
  • From: Fritz Anderson <email@hidden>
  • Date: Thu, 21 Jul 2005 13:27:11 -0500

Can you finesse the problem by replacing the implementation of addPersons: with

{
    [[self mutableSetValueForKey: @"persons"] unionSet: inPersons];
}

? The documentation is sparse (except in NSKeyValueCoding.h), but I had understood that that, and not trying to mutate the primitive value, is how one mutates to-many relations.

    -- F

On 21 Jul 2005, at 6:46 AM, Bill Cheeseman wrote:

In my scriptable Core Data application, I attempt to add a set of managed
objects to a to-many relationship using the technique shown for the example
accessor method in the Managed Object Accessor Methods documentation, like
this:


- (void)addPersons:(NSSet *)inPersons {
    [self willChangeValueForKey:@"persons"
withSetMutation:NSKeyValueUnionSetMutation usingObjects:inPersons];
    [[self primitiveValueForKey:@"persons"] unionSet:inPersons];
    [self didChangeValueForKey:@"persons"
withSetMutation:NSKeyValueUnionSetMutation usingObjects:inPersons];
}

But I get an error on the last line: "[NSIndexSpecifier
_isMaintainingInverse]: selector not recognized."

In case it matters, I have in fact set up the inverse for this relationship.

Is this a Cocoa bug, or am I overlooking something?


_______________________________________________ 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: Missing Core Data selector
      • From: Bill Cheeseman <email@hidden>
References: 
 >Missing Core Data selector (From: Bill Cheeseman <email@hidden>)

  • Prev by Date: NSTreeController Filtering
  • Next by Date: Re: How do I add additional Attributes to a Core Data Entity?
  • Previous by thread: Missing Core Data selector
  • Next by thread: Re: Missing Core Data selector
  • Index(es):
    • Date
    • Thread