CoreData code working on Tiger - not on Leopard
CoreData code working on Tiger - not on Leopard
- Subject: CoreData code working on Tiger - not on Leopard
- From: Steve Cronin <email@hidden>
- Date: Tue, 18 Mar 2008 02:33:25 -0500
Folks;
I am now testing a Tiger application on Leopard and learning the new
Leopard way at the same time.
I admit I have a lot of Leoparding to do!
I use Core Data (SQLite) pretty extensively on Tiger - life is good.
I take the project and run it without any changes to the model or the
code and Core Date won't save to disk.
I load a set of data on initial launch and at the end of that process
I have Core Data 'save'.
The data loading all appears to run fine:
recX = [NSEntityDescription insertNewObjectForEntityForName:@"XYZ"
inManagedObjectContext:moc];
[recX setValue:@"123" forKey:@"source"];
...
5 different entities and 1,000s of records..
I've looked over the 'Core Data - Release Notes' but I don't see
anything that seems to indicate a model conversion or persistant
store conversions.... I have not made any changes (no versioning...)
Here's the 'save' code:
- (void) updateCoreData {
NSManagedObject *moc = [self managedObjectContext];
[moc processPendingChanges];
if ([moc commitEditing]) {
NSError *error;
if ([moc save:&error]) {
if (error!=nil) {
On Leopard in the 'processPendingChanges' invocation I get the
following:
0 0x900ef0f4 in ___TERMINATING_DUE_TO_UNCAUGHT_EXCEPTION___
#1 0x93d680fb in objc_exception_throw
#2 0x9649a2a5 in -[NSManagedObjectContext
(_NSInternalChangeProcessing) _processRecentChanges:]
#3 0x964adbea in -[NSManagedObjectContext processPendingChanges]
#4 0x0002032e in -[AppDelegate updateCoreData] at AppDelegate.m:700
BTW: I also get a similar error if, during the loading, I try to get
a 'count' using a FetchTemplate with a null predicate (works on Tiger)
It appears the fetch also causes a 'processRecentChanges)
What am I missing?
Thanks for your help!
Steve
_______________________________________________
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