GrahamDennis/GDCoreDataConcurrencyDebugging — pull request #1 by petrocket (2013-09-20 18:59:14+00:00)
Title: [FIX] it is possible that temporary NSManagedObjects get created with a ...

[FIX] it is possible that temporary NSManagedObjects get created with a nil context, in which case the desiredConcurrencyIdentifier may be nil, even though correct concurrency is being respected. This seems to fix the numerous logged errors. Example case:

// create a temporary NSManagedObject
NSEntityDescription *entity = [NSEntityDescription entityForName:@"EntityName"
inManagedObjectContext:moc];
__block NSManagedObject *obj = nil;
[moc performBlockAndWait:^{
obj = [[NSManagedObject alloc] initWithEntity:entity insertIntoManagedObjectContext:nil];
obj.key = @"value";
}];

// use obj here, validate etc.

// insert into some moc at some later point / or not
[moc performBlockAndWait:^{
moc insertObject:obj];
}];