Merge branch 'master' of github.com:magicalpanda/MagicalRecord

This commit is contained in:
Saul Mora
2011-11-27 23:52:05 -07:00
2 changed files with 24 additions and 5 deletions

19
MagicalRecord.podspec Normal file
View File

@@ -0,0 +1,19 @@
Pod::Spec.new do |s|
s.name = 'MagicalRecord'
s.version = '1.7.1'
s.license = 'MIT'
s.summary = 'Super Awesome Easy Fetching for Core Data 1!!!11!!!!1! '
s.homepage = 'http://github.com/magicalpanda/MagicalRecord'
s.author = { 'Saul Mora' => 'saul@magicalpanda.com' }
s.source = { :git => 'http://github.com/magicalpanda/MagicalRecord.git', :tag => '1.7.1' }
s.description = 'Handy fetching, threading and data import helpers to make Core Data a little easier to use.'
s.source_files = 'Source/**/*.{h,m}'
s.framework = 'CoreData'
def s.post_install(target)
prefix_header = config.project_pods_root + target.prefix_header_filename
prefix_header.open('a') do |file|
file.puts(%{#ifdef __OBJC__\n#define MR_SHORTHAND 1\n#import "CoreData+MagicalRecord.h"\n#endif})
end
end
end

View File

@@ -418,7 +418,7 @@ static NSUInteger defaultBatchSize = kMagicalRecordDefaultBatchSize;
groupedBy:group
inContext:context];
[self performFetch:controller];
[self MR_performFetch:controller];
return controller;
}
@@ -747,16 +747,16 @@ static NSUInteger defaultBatchSize = kMagicalRecordDefaultBatchSize;
[ed setExpression:ex];
// determine the type of attribute, required to set the expression return type
NSAttributeDescription *attributeDescription = [[[self entityDescription] attributesByName] objectForKey:attributeName];
NSAttributeDescription *attributeDescription = [[[self MR_entityDescription] attributesByName] objectForKey:attributeName];
[ed setExpressionResultType:[attributeDescription attributeType]];
NSArray *properties = [NSArray arrayWithObject:ed];
MR_RELEASE(ed);
NSFetchRequest *request = [self requestAllWithPredicate:predicate inContext:context];
NSFetchRequest *request = [self MR_requestAllWithPredicate:predicate inContext:context];
[request setPropertiesToFetch:properties];
[request setResultType:NSDictionaryResultType];
NSDictionary *resultsDictionary = [self executeFetchRequestAndReturnFirstObject:request];
NSDictionary *resultsDictionary = [self MR_executeFetchRequestAndReturnFirstObject:request];
NSNumber *resultValue = [resultsDictionary objectForKey:@"result"];
return resultValue;
@@ -767,7 +767,7 @@ static NSUInteger defaultBatchSize = kMagicalRecordDefaultBatchSize;
return [self aggregateOperation:function
onAttribute:attributeName
withPredicate:predicate
inContext:[NSManagedObjectContext defaultContext]];
inContext:[NSManagedObjectContext MR_defaultContext]];
}
- (id) MR_inContext:(NSManagedObjectContext *)otherContext