I'm checking out the default Xcode template for an iPhone Core Data project. In the method that returns the fetched result controller I see this:
- (NSFetchedResultsController *)fetchedResultsController {
...
NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init];
NSEntityDescription *entity = [NSEntityDescription entityForName:@"Event" inManagedObjectContext:managedObjectContext];
[fetchRequest setEntity:entity];
...
return fetchedResultsController;
}
It seems to be setting specific entity name. What If I have multiple entities? Would I have 2 NSFetchedResultsController instances and have 2 methods that return the correct controller depending on which entity I'm using?
Thanks