title: Core Data: Illegal attempt to establish relationship + (null) context
body: <p>I am parsing data on a background thread, inserting new entities and setting up relationships with other existing entities.</p>
  
  <p>Sometimes I get the error: 'attempting to establish relationship between objects in different contexts'.</p>
  
  <p>After reading more about this I am now creating a new ManagedObjectContect in my background thread and using it to insert the new entities and setup the relationships.  I am careful to only use this new ManagedObjectContext in my background thread.  When I need to find an existing entity to setup a relationship between an existing object and one of these new objects, I call [moc objectWithId:id] to fetch the existing object using my new moc.  However, I am still getting the error.</p>
  
  <p>Frustrated, I started printing things out.  I noticed that when I print out the managedObjectContext property for each NSManagedObject, just before setting up the relationship, I sometimes get '(null)' printed out.  This seems to be when the problem occurs.</p>
  
  <p>Can anyone tell me what I am doing wrong?  Why do I sometimes have (null) mocs on my objects?</p>
  
  <p>Thanks for any help you can give!</p>