magicalpanda/MagicalRecord — pull request #389 by appempire (2013-01-19 02:26:15+00:00)
Title: Added find and delete methods that creates a where clause based on a dictionary of attributes and values.

With literals being available now for dictionaries it is super handy to do make a query return on a nice clean dictionary of key value pairs. This compliments the existing find/delete by attribute methods. Examples of use:
[SomeClass MR_deleteAllMatchingDictionaryOfAttributesAndValues:@{@"firstName" : @"Gary", @"lastName" : @"Tubbs"}];
NSArray *results = [SomeClass MR_FindAllMatchingDictionaryOfAttributesAndValues:@{@"firstName" : @"Gary", @"lastName" : @"Tubbs"}];

Added:

(NSArray *) MR_FindAllMatchingDictionaryOfAttributesAndValues:(NSDictionary *)attributesAndValues;
(NSArray *) MR_FindAllMatchingDictionaryOfAttributesAndValues:(NSDictionary *)attributesAndValues inContext:(NSManagedObjectContext *)context;
(BOOL) MR_deleteAllMatchingDictionaryOfAttributesAndValues:(NSDictionary *)attributesAndValues inContext:(NSManagedObjectContext *)context;
(BOOL) MR_deleteAllMatchingDictionaryOfAttributesAndValues:(NSDictionary *)attributesAndValues;