Re: Core Data add object
Re: Core Data add object
- Subject: Re: Core Data add object
- From: Ivan C Myrvold <email@hidden>
- Date: Sun, 25 May 2008 13:25:44 +0200
I think I was too fast with my conclusion that it doesn't work. I just
looked at the warning I got, which says: "NSManagedObject may not
respond to -addCallEventsObject".
Ivan
Den 25. mai. 2008 kl. 13:08 skrev Ivan C Myrvold:
I have a core data project with two entities, Call and CallEvent.
In the Call entity, I have a to-many relationship to CallEvent.
I create the two objects in code with
thecall = [NSEntityDescription
insertNewObjectForEntityForName:@"Call" inManagedObjectContext:[self
managedObjectContext]];
and
thecallevent = [NSEntityDescription
insertNewObjectForEntityForName:@"CallEvent" inManagedObjectContext:
[self managedObjectContext]];
I now want to add the callevent object to thecall object. I see in
the NSManagedObject subclass Call there is a method prepared for this,
- (void)addCallEventsObject:(CallEvent *)value;
simply doing
[thecall addCallEventsObject:thecallevent];
is not working, of course. So how do I add this object?
Ivan
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden