Created
October 1, 2013 09:57
-
-
Save liamnichols/6776218 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Pull all the policy option hash's into memory | |
NSManagedObjectContext *managedObjectContext = [[SalesManager sharedSalesManager] managedObjectContext]; | |
NSExpressionDescription* objectIdDesc = [NSExpressionDescription new]; | |
objectIdDesc.name = @"objectID"; | |
objectIdDesc.expression = [NSExpression expressionForEvaluatedObject]; | |
objectIdDesc.expressionResultType = NSObjectIDAttributeType; | |
NSFetchRequest *search = [NSFetchRequest fetchRequestWithEntityName:[ExtraPrice entityName]]; | |
search.resultType = NSDictionaryResultType; | |
search.returnsDistinctResults = YES; | |
search.propertiesToFetch = @[ @"extraHash", objectIdDesc ]; | |
NSArray *allHashes = [managedObjectContext executeFetchRequest:search error:nil]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment