title: NSPredicate, executeFetchRequest crash
body: <p>I'm doing a Core Data tutorial and I keep getting a crash. It's a objc_exception_throw.</p>
  
  <p>I create a method called loadTableData and call it in viewDidLoad</p>
  
  <pre><code>-(void)loadTableData{
      NSManagedObjectContext *context = [[self appDelegate]managedObjectContext];
      NSFetchRequest *fetchRequest = [[NSFetchRequest alloc]init];
      NSEntityDescription *entity = [NSEntityDescription entityForName:@"Label" inManagedObjectContext:context];
  
      [fetchRequest setEntity:entity];
  
      NSPredicate *predicate = [NSPredicate predicateWithFormat:@"label like %@", [context objectWithID: self.labelID]];
  
      [fetchRequest setPredicate:predicate];
  
  
      NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc]initWithKey:@"name" ascending:YES];
  
      NSArray *sortDescriptors = [[NSArray alloc]initWithObjects:sortDescriptor, nil];
      [fetchRequest setSortDescriptors:sortDescriptors];
  
      NSError *error = nil;
      self.artistArray = [context executeFetchRequest:fetchRequest error:&amp;error];
  
      [self.tableView reloadData];
  }
  </code></pre>
  
  <p>It gets stuck here</p>
  
  <pre><code>self.artistArray = [context executeFetchRequest:fetchRequest error:&amp;error];
  </code></pre>
  
  <p>Commenting out the predicate alloc/init and setPredicate method call results in an app that doesn't crash, but doesn't do what I want.</p>
  
  <p>See entities and relationships below.</p>
  
  <p><img src="https://i.stack.imgur.com/FJF9d.png" alt="Core Data Entities"></p>
  
  <p>In LabelViewController here is additional code to show how [context objectWithID: self.labelID] is set</p>
  
  <pre><code>-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
  {
      MLBLArtistViewController *artistViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"ArtistViewController"];
  
      Label *label = [self.labelArray objectAtIndex:indexPath.row];
  
      artistViewController.labelID = [label objectID];
  
      [self.navigationController pushViewController:artistViewController animated:YES];
  }
  </code></pre>