Re: Missing Core Data selector
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