title: Save objects from multiple stores to single persistent store
body: <p>I have two persistent stores with objects that use the same model.  I would like to open both stores in one context, but save the context to only a single store, and then safely delete one of the stores.  I am in essence trying to merge the contents of two persistent stores into a single persistent store.  Because the entities have relationships, I am finding this difficult.</p>
  
  <p>From <a href="https://stackoverflow.com/questions/3741668/combining-two-sqlite-stores-into-one">this answer</a>:</p>
  
  <blockquote>
    <p>If you do need to have relationships between the objects in both stores, or you really just want to have a single store, your best bet would be to create a second NSPersistentStoreCoordinator and a third, distinct persistent store to hold the merged object graph. You will need to write code to create copies of the objects in a managed object context attached to this second NSPersistentStoreCoordinator. You'll need to set up the same relationships among the copies that the original objects had, too, but how you go about doing this depends on your data model.</p>
  </blockquote>
  
  <p>That makes it seem clear, except for the details of how, literally, to make copies of the objects for the new store.  Is this a migration issue?</p>