title: Swift NSFetchedResultsController ignores NSPredicate
body: <p>i'm debugging the following code for hours now.</p>
  
  <p>For me, it looks like my NSPredicate gets simply ignored.
  I've 2 entries in the core data database. Whatever predicate I set I always get back these two entries. Both have a property called <code>type</code> that is 1. Even if I set the predicate to <code>(type == 5)</code> the same 2 entries are fetched.</p>
  
  <pre><code>    // MARK: - Fetched results controller
  
  var fetchedResultsController: NSFetchedResultsController {
      if _fetchedResultsController != nil {
          return _fetchedResultsController!
      }
  
  
      let fetchRequest = NSFetchRequest()
      // Edit the entity name as appropriate.
      let entity = NSEntityDescription.entityForName("Item", inManagedObjectContext: self.managedObjectContext!)
      fetchRequest.entity = entity
  
      // simply ignores verything here...
      // -----------------------------------------------
      // I can use (type == 5) whereby the db only contains items with type == 1...
      // It's like the predicate is nevery used in the fetchrequest.
      fetchRequest.predicate = NSPredicate(format: "(name LIKE '%Eier%')")!
      println(fetchRequest.predicate)
  
      // Set the batch size to a suitable number.
      fetchRequest.fetchBatchSize = 20
  
      // Edit the sort key as appropriate.
      let sortDescriptor = NSSortDescriptor(key: "date", ascending: false)
      let sortDescriptors = [sortDescriptor]
  
      fetchRequest.sortDescriptors = [sortDescriptor]
  
      let aFetchedResultsController = NSFetchedResultsController(fetchRequest: fetchRequest, managedObjectContext: self.managedObjectContext!, sectionNameKeyPath: nil, cacheName: "Main")
      aFetchedResultsController.delegate = self
      _fetchedResultsController = aFetchedResultsController
  
      var error: NSError? = nil
      if !_fetchedResultsController!.performFetch(&amp;error) {
          abort()
      }
  
      return _fetchedResultsController!
  }
  var _fetchedResultsController: NSFetchedResultsController? = nil
  </code></pre>