title: Auto-Incremented Object ID in Core Data?
body: <p>I am working with several <code>NSManagedObject</code> types with several relationships. How can I tell Core Data to automatically populate object IDs for me? I'm looking for something like an index key in SQL, so that no two instances of a given object are allowed to have the same ID.</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>I'd like for all of my "Account" objects to have unique IDs on them. I was just adding one to the `countForFetchRequest, but I realized that when deleting the second to last object and then adding one, the last two objects now have the same IDs.</p>
  
  <p>How can I ensure that a given value has a unique value for all instances of my "Account" NSManagedObject?</p>
  
  <p><strong>EDIT2:</strong> </p>
  
  <p>I need to have a separate ID for sorting purposes.</p>