title: Can I tell Core Data to use a specific unique ID for an y object when saving it?
body: <p>Example: I read data from an XML file. This data has unique id elements. I want to store those objects with their original unique id. How would I do that?</p>
  
  <p>I figured out I could ask the managed object for it's ID, like this:</p>
  
  <pre><code>NSManagedObjectID *moID = [managedObject objectID];
  </code></pre>
  
  <p>but here the problem is: The XML tells me with the id element <em>which</em> object this is, and I need to look up in the database of core data if this object already exists in there, or not. So is it the only option to make an id attribute in my managed object model for that entity and then query for that? Then I will have two id systems right?</p>