This is something that I just canβt understand when working with Core Data. I want to work with NSFetchedResultsControllerDelegate, and the regular code that I have seen so far is easy to understand, but always based on one entity model. Thus, you want to show all the βeventsβ in your table, you make a query for sampling in the Event entity and there, you are ready to work.
The fact is that my model:
City (one-to-one) Company (one-to-many) Employees
My table should show employees, but the choice should be based on the city to get the Company, and then the Employees, right? I completely lost this, I just donβt see how to make a selection.
Because if I get a city or company and I put employees in an NSMutableSet, do I not lose all the standalone UITableViewController synchronizations? For example, if I do it this way, I will not be able to do something like
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { id <NSFetchedResultsSectionInfo> sectionInfo = [[_fetchedResultsController sections] objectAtIndex:section]; return [sectionInfo numberOfObjects]; }
source share