title: Core Data could not fulfill fault for object after obtainPermanentIDs
body: <p>I'm getting data from a webserver, processing it on a child private background context called <code>backgroundMOC</code>. It is a child of a <code>mainMOC</code> which is linked to the main UI, so saving on the <code>backgroundMOC</code> triggers UI changes. The <code>mainMOC</code> is a child of a <code>masterMOC</code> which is a private background queue tied to the persistent store, so saving on the master saves to disk. </p>
  
  <p>What I do now is receive data, create new objects on <code>backgroundMOC</code>, then save <code>backgroundMOC</code> (so that the UI updates), save <code>mainMOC</code>, (so that I can almost save to disk), and save <code>masterMOC</code> (so that I can finally write to disk). The problem is that when the object appears in the UI via a fetched results controller, the <code>objectId</code> is still a temporary one. </p>
  
  <p>This causes problems with duplicate row issues, where if I receive the same data from the server (by accident), my <code>backgroundMOC</code> does not know that this object already exists because it has not been assigned a permanent id, so it creates another object. When I restart the app, the duplicate object disappears, so I know it's just an issue with id mapping. </p>
  
  <p>So I thought I might try </p>
  
  <pre><code>[backgroundMOC obtainPermanentIDsForObjects:backgroundMOC.registeredObjects.allObjects error:nil];
  </code></pre>
  
  <p>before saving at all (I've tried after saving too). However, for some reason, calling this line throws an exception:</p>
  
  <blockquote>
    <p>CoreData could not fulfill a fault for...</p>
  </blockquote>
  
  <p>If you have any hints that might lead me in the right direction, please share. Thanks</p>
  
  <p><strong>Edit:</strong> Ok so initially I was calling obtainPermanentIDsForObjects on the backgroundMOC, which is a child of the mainMOC, which is a child of the masterMOC. I switched it so that I obtain the ids on the mainMOC, and it solved all my problems (for now). Was I never supposed to call obtainPermIds on the child context?</p>