Bug fix for deleteEntity. Use the objects context, not any of the global contexts.

This commit is contained in:
Brian King
2011-04-05 11:14:05 -04:00
parent 40527741b9
commit 287896d830

View File

@@ -624,7 +624,7 @@ static NSUInteger defaultBatchSize = kActiveRecordDefaultBatchSize;
- (BOOL) deleteEntity
{
[self deleteInContext:[NSManagedObjectContext contextForCurrentThread]];
[self deleteInContext:[self managedObjectContext]];
return YES;
}
@@ -664,7 +664,7 @@ static NSUInteger defaultBatchSize = kActiveRecordDefaultBatchSize;
- (id) objectWithMinValueFor:(NSString *)property
{
return [self objectWithMinValueFor:property inContext:[NSManagedObjectContext contextForCurrentThread]];
return [self objectWithMinValueFor:property inContext:[self managedObjectContext]];
}