title: Swift Core Data - Request with distinct results
body: <p>how I can call es request with distinct values in swift?</p>
  
  <p>This is my code:</p>
  
  <pre><code>let appDelegate: AppDelegate = UIApplication.sharedApplication().delegate as AppDelegate
      let context: NSManagedObjectContext = appDelegate.managedObjectContext
  
      let request = NSFetchRequest(entityName: "MedicalData")
      request.propertiesToFetch = NSArray(object: "docID")
      request.returnsObjectsAsFaults = false
      request.returnsDistinctResults = true
  
      var results:NSArray = context.executeFetchRequest(request, error: nil)
  
      for data in results {
          var thisData = data as MedicalData
          println(thisData.docID)
      }
  </code></pre>
  
  <p>I want to get distinct values for "docID" but I get all of the entity :(</p>
  
  <p>Thank your for help!</p>