I have one CoreData model object that includes a type named sessionID (a uuid generated every time the user uses a feature in the app) - data keep coming in and recorded with the same sessionID for each session.
The recorded data would look like this: x number of lines with lets say sessionID:...1 and then y number of records for sessionID:...2
```
sessionID: 0000-0000-0000-0000-0001, ...
sessionID: 0000-0000-0000-0000-0001, ...
sessionID: 0000-0000-0000-0000-0002, ...
sessionID: 0000-0000-0000-0000-0002, ...
sessionID: 0000-0000-0000-0000-0002, ...
Etc. ```
I am using NSFetchResultsController to present the records to the user on a UITableView, (and it works) However, I would like to have an option toggle between presentation of all records and of only the unique sessionID as rows on the table view. Is that possible with NSFetchResultController?
While I am setting the request to return distinct results, it does not seem to work, I am still getting all the records.
```
[fetchRequest setEntity:entity];
[fetchRequest setReturnsDistinctResults:YES];
[fetchRequest setPropertiesToFetch:@[@"session_id"]];
```