title: Core Data context not saving while trying to update (in Swift)
body: <p>I'm trying to update a Core Data set following on from a query (an update). For some reason, the code does not seem to be saving, no error is being thrown, and I can't figure out why.</p>
  
  <p>Here's the code extract:</p>
  
  <pre><code>var appDel: AppDelegate = (UIApplication.sharedApplication().delegate as AppDelegate)
  var context: NSManagedObjectContext = appDel.managedObjectContext!
  
  if itemId != nil {
      var request = NSFetchRequest(entityName:"CheckListItem")
      request.returnsObjectsAsFaults = false
      request.predicate = NSPredicate(format:"itemId == '\(itemId!)' ")
  
      var queryResults:NSArray = context.executeFetchRequest(request, error: nil)!
  
      if queryResults.count &gt; 1 {
          CLAlog("DSF-updateChecklistItem-update: Item ID Provided, but a singluar item not found in Core Data", 1)
          abort()
      }
  
      // Update Existing Item
      queryResults[0].setValue(itemList["itemTitle"]!, forKeyPath: "itemTitle")
      queryResults[0].setValue(itemList["itemDescription"]!, forKeyPath: "itemDescription")
      queryResults[0].setValue(itemType, forKeyPath: "itemType")
  
      //queryResults[0].setValue(itemList["itemDisplayOrder"], forKeyPath: "itemDisplayOrder")
  
      var contextError: NSError? = nil
      context.save(&amp;contextError)
  }
  </code></pre>
  
  <p>Any help you could offer would be appreciated.</p>