title: NSPredicate with Swift and Core Data
body: <p>i have a Core Data Object and i have 2 Fieds (one String(GUID) and one Int which i want to use as Filter)</p>
  
  <p>So in SQL it would be "SELECT * FROM Answers WHERE qIndex = 1 AND GUID = '88bfd206-82fb-4dd0-b65d-096f8902855c'</p>
  
  <p>Ive tried it with Core Data but i am not able to Filter with the String Value.</p>
  
  <p>Here is my Code</p>
  
  <pre><code>    var request = NSFetchRequest(entityName: "Answers")
      request.returnsObjectsAsFaults = false;
  
      let resultPredicate1 = NSPredicate(format: "qIndex = %i", qIndex)
      let resultPredicate2 = NSPredicate(format: "formUUID = %s", formUUID)
  
      var compound = NSCompoundPredicate.andPredicateWithSubpredicates([resultPredicate1, resultPredicate2])
      request.predicate = compound
  
  
      var results:NSArray = context.executeFetchRequest(request, error: nil)
  </code></pre>
  
  <p>Any ideas what i am doing Wrong? With the Same Code and Filter for 2 Integer Values it works fine.</p>
  
  <p>Thanks in Advance</p>