title: iOS: executeFetchRequest:error: A fetch request must have an entity
body: <p>I developed an application targeted for iPhone and it uses CoreData. All is working ok when  I run it on the simulator, but when I run it on the device I'm getting the following error: </p>
  
  <p><code>"*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'executeFetchRequest:error: A fetch request must have an entity.'"</code></p>
  
  <p>I have specified and defined an entity in my code as follows: </p>
  
  <pre><code>NSFetchRequest *select = [[NSFetchRequest alloc] init];
  NSEntityDescription *entity = [NSEntityDescription entityForName:@"NewsStand" inManagedObjectContext:[CDHelper sharedCDHelper].managedObjectContext];
  [select setEntity:entity];
  NSError *error;
  NSMutableArray *results = [[[CDHelper sharedCDHelper].managedObjectContext executeFetchRequest:select error:&amp;error] mutableCopy];
  </code></pre>
  
  <p>The error occurs when I execute the fetch to show in a tableView what has stored the DB. </p>
  
  <p>I also have defined a managedObjectModel:</p>
  
  <pre><code>- (NSManagedObjectModel *)managedObjectModel
   {
  if (__managedObjectModel != nil)
  {
      return __managedObjectModel;
  }
  NSURL *modelURL = [[NSBundle mainBundle] URLForResource:@"newsStandModel" withExtension:@"momd"];
  __managedObjectModel = [[NSManagedObjectModel alloc] initWithContentsOfURL:modelURL];    
  return __managedObjectModel;
  }
  </code></pre>