Core Data: attempt to insert nil key exception on save:
Core Data: attempt to insert nil key exception on save:
- Subject: Core Data: attempt to insert nil key exception on save:
- From: Paul Collins <email@hidden>
- Date: Tue, 20 Jun 2006 12:47:08 -0700
I have a model which includes an entity "Server" with sub-entities
"iDisk" and "FileServer". Each has a custom class, and the latter
two's classes are subclasses of Server's class. "iDisk" works fine,
but when I insert a "FileServer" and then save, I get exception: -
[NSCFDictionary setObject:forKey:]: attempt to insert nil key. With
backtrace:
#0 0x92991008 in -[NSException raise] ()
#1 0x92990e5c in +[NSException raise:format:] ()
#2 0x92957468 in -[NSCFDictionary setObject:forKey:] ()
#3 0x94103334 in -[NSXMLDocumentMap
nodeFromManagedObject:objectIDMap:] ()
#4 0x941025dc in -[NSXMLDocumentMap addObject:objectIDMap:] ()
#5 0x94102070 in -[NSMappedObjectStore
executeSaveChangesRequest:withContext:] ()
#6 0x940e26f8 in -[NSPersistentStoreCoordinator(_NSInternalMethods)
executeRequest:withContext:] ()
#7 0x940f5b68 in -[NSManagedObjectContext save:] ()
#8 0x00004f28 in -[GSApp applicationShouldTerminate:]
(self=0x3868c0, _cmd=0x90a8c68c, sender=0x31c7d0) at /Users/paul/Gray/
Projects/Digittach/dev/Digittach/GSApp.m:390
#9 0x937c3ab8 in -[NSApplication _docController:shouldTerminate:] ()
#10 0x937c34c0 in -[NSApplication _shouldTerminate] ()
To isolate the problem, I changed FileServer's class to just an empty
subclass of Server's class. I can insert a "Server" and save ok, but
not a "FileServer", which should be the same thing, shouldn't it?
I tried building a separate bare bones Core Data app with just the
entities and empty classes, but can't replicate it there, so there's
something I'm doing in the real app.
I can't see anything unusual about the "FileServer" object from it's
description. Anybody have a suggestion?
Thanks,
Paul Collins
** Gracion Software LLC http://www.gracion.com/ **
** Tel: +1 (541) 488-3488 iChat/AV/AIM: gracionsoft **
** DigiTunnel 1.4 PPTP/VPN client for OS X **
** Pronto Patent - search/download US patents fast **
** And check out: http://www.opendoor.com/doorstop/ **
_______________________________________________
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