Core Data Problem with [NSCFNumber _isKindOfEntity:]
Core Data Problem with [NSCFNumber _isKindOfEntity:]
- Subject: Core Data Problem with [NSCFNumber _isKindOfEntity:]
- From: Jonas Oberschweiber <email@hidden>
- Date: Fri, 2 Jun 2006 16:55:25 +0200
Hi,
I have a problem in the Core Data application I'm developing:
When I try to programatically create one of my entities and then save
it, the whole application crashes with this error message:
[NSCFNumber _isKindOfEntity:]
This is the code that I use to create the entity:
NSManagedObject *newDefect = [NSEntityDescription
insertNewObjectForEntityForName:@"Defect"
inManagedObjectContext:_managedObjectContext];
[newDefect setValue:@"defect1" forKey:@"title"];
[newDefect setValue:@"test" forKey:@"desc"];
[_managedObjectContext save:NULL];
[newDefect setValue:newUser forKey:@"author"];
[newDefect setValue:newComponent forKey:@"component"];
[newDefect setValue:@"OPEN" forKey:@"status"];
[newDefect setValue:newType forKey:@"type"];
[newDefect setValue:newSeverity forKey:@"severity"];
[_managedObjectContext save:NULL];
The newUser, newComponent, newType and newSeverity NSManagedObjects
exist.
At first I thought that this was an issue with relationships, as some
guy had
a similar error message that was related to relationships. I then
made all the relationships
optional and tried again, but that didn't help. All the other objects
save fine, it's just this one
object.
Any ideas where this error could come from?
Best Regards
Jonas Oberschweiber
_______________________________________________
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