I’m trying to setup my NSFetchRequest to core data to retrieve the unique values for a specific attribute in an entity. i.e.
an entity with the following information:
name | rate | factor |
_______|______|________|
John | 3.2 | 4 |
Betty | 5.5 | 7 |
Betty | 2.1 | 2 |
Betty | 3.1 | 2 |
Edward | 4.5 | 5 |
John | 2.3 | 4 |
How would i set up the request to return an array with just: John, Betty, Edward?
You should use the backing store to help you get distinct records.
If you want to get an array with just John, Betty, Edward here’s how you do it: