mirror of
https://github.com/zhigang1992/MagicalRecord.git
synced 2026-01-12 17:32:18 +08:00
Bug fix for deleteEntity. Use the objects context, not any of the global contexts.
This commit is contained in:
@@ -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]];
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user