title: How to get Core Data Object with Object itself as ID?
body: <p>i read out all my Core Data Objects using: </p>
  
  <pre><code>var fetchRequest = NSFetchRequest(entityName: "QuestionsSelectOption")
  fetchRequest.predicate = NSPredicate(format: "questions = %@", currentQuestion!)
  selectOptions = context.executeFetchRequest(fetchRequest, error: nil) as [QuestionsSelectOption]
  </code></pre>
  
  <p>And now i can use my Objects with </p>
  
  <pre><code>let myTestObject = selectOptions(index) as QuestionsSelectOption
  </code></pre>
  
  <p>But how do i update a Core Data Object without any Identifier? How can i make a NSPredicate with my Object itself as my ID?</p>
  
  <p>Or what is the best way to update (in this case) "myTestObject" in Swift? I could use the Index, but i dont think that is a good way. </p>
  
  <p>Edit: Now i use:</p>
  
  <pre><code>request.predicate = NSPredicate(format: "self = %@", myTestObject)
  var results = context.executeFetchRequest(request, error: nil) as Array
  
      if(results.count == 1) {
  
          let currentQuestionSelectOption = results[0] as QuestionsSelectOption
  
          currentQuestionSelectOption.selected = selected
  
          context.save(nil)
      }
  </code></pre>
  
  <p>It works - But is there not an easier/better solution? </p>