title: How can I update my fetchedResultsController upon tableView row selection?
body: <p>Ok, I am getting better at this Core Data stuff, but I've got a ways to go. This is how I am populating my fetchedResultsController when my view loads:</p>
  
  <pre><code>- (NSFetchedResultsController *)fetchedResultsController
  {
  if (__fetchedResultsController != nil)
  {
      return __fetchedResultsController;
  }
  
  /*
   Set up the fetched results controller.
   */
  // Create the fetch request for the entity.
  NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init];
  // Edit the entity name as appropriate.
  NSEntityDescription *entity = [NSEntityDescription entityForName:@"Visit" inManagedObjectContext:self.managedObjectContext];
  [fetchRequest setEntity:entity];
  
  // Set the batch size to a suitable number.
  [fetchRequest setFetchBatchSize:20];
  
  // Edit the sort key as appropriate.
  NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"date" ascending:NO];
  NSArray *sortDescriptors = [[NSArray alloc] initWithObjects:sortDescriptor, nil];
  
  [fetchRequest setSortDescriptors:sortDescriptors];
  
  // Edit the section name key path and cache name if appropriate.
  // nil for section name key path means "no sections".
  NSFetchedResultsController *aFetchedResultsController = [[NSFetchedResultsController alloc] initWithFetchRequest:fetchRequest managedObjectContext:self.managedObjectContext sectionNameKeyPath:nil cacheName:@"Queue"];
  aFetchedResultsController.delegate = self;
  self.fetchedResultsController = aFetchedResultsController;
  
  NSPredicate *predicate =[NSPredicate predicateWithFormat:@"(isActive == YES)"];
  [fetchedResultsController.fetchRequest setPredicate:predicate];
  
  NSError *error = nil;
  if (![self.fetchedResultsController performFetch:&amp;error])
  {
      /*
       Replace this implementation with code to handle the error appropriately.
  
       abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. If it is not possible to recover from the error, display an alert panel that instructs the user to quit the application by pressing the Home button.
       */
      NSLog(@"Unresolved error %@, %@", error, [error userInfo]);
      abort();
  }
  
  return __fetchedResultsController;
  }
  </code></pre>
  
  <p>This works great. I have the fetchedResultsController hooked up to my tableView and I have 5 managed objects that are showing up. The problem I am running into is when I need to make a change to one of the managed objects. </p>
  
  <p>As you can see in the predicate I am specifying that I only want managed objects that have <code>isActive == YES</code>. I need to change a managed object's isActive status to NO, and then remove it from the fetchedResultsController, and ultimately the tableView.</p>
  
  <p>Here is how I am trying to do that:</p>
  
  <pre><code>-(void) seatedButton{
  Visit * vis = [self.fetchedResultsController objectAtIndexPath:[NSIndexPath indexPathForRow:reloadIndex inSection:0]];
  
  vis.isActive = [NSNumber numberWithBool:NO];
  
  NSError *error = nil;
  
  if (![self.managedObjectContext save:&amp;error])
  {
      /*
       Replace this implementation with code to handle the error appropriately.
  
       abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. If it is not possible to recover from the error, display an alert panel that instructs the user to quit the application by pressing the Home button.
       */
      NSLog(@"Unresolved error %@, %@", error, [error userInfo]);
      abort();
  }
  
  [tableView reloadData];
  
  }
  </code></pre>
  
  <p>It appears that this would work, but it doesn't. When the tableView is reloaded, 5 objects come back as fitting the requirements of the predicate, when it should only be 4! </p>
  
  <p><strong>What am I doing wrong here? What do I need to do to update the fetchedResultsController? Thanks!</strong></p>