Reputation: 137
How to convert the sql queries into predicates or fetch requests,
select a.name from a group by a.name;
Upvotes: 0
Views: 225
Reputation: 7241
It is a possible solution:
NSFetchRequest* request = [NSFetchRequest fetchRequestWithEntityName:@"a"];
[request setPropertiesToFetch:@[@"name"]];
[request setPropertiesToGroupBy:@[@"name"]];
[request setResultType:NSDictionaryResultType];
Upvotes: 1