title: Unable to retrieve previous data with EncryptedCoreData
body: <p>After app is restarted data from core-data is not returned properly. And fetch request to get a particular record also fails. FetchRequestController do not grabs any record once app is re-started.</p>
  
  <p>I am using <a href="https://github.com/project-imas/encrypted-core-data" rel="nofollow">encrypted-core-data</a> to protect data in my project. I am able to parse and save data to managedObjectContext. My code looks like this</p>
  
  <pre><code>for (NSDictionary *data in categories) {
      //Use MagicRecord api to get a record
      CMCategories *Obj = [CMCategories MR_findFirstByAttribute:@"uniqueId" 
                      withValue:[data valueForKey:@"id"] 
                      inContext:managedObjectContext];
      if (!Obj) {
          Obj = [CMCategories MR_createEntityInContext:managedObjectContext];
      }
      Obj.name = [data valueForKey:@"CategoryName"];
      Obj.language = [data valueForKey:@"LanguageCode"];
      Obj.uniqueId = [data valueForKey:@"id"];
  
  }
  NSError *error = nil;
  if (![_managedObjectContext save:&amp;error]) {
      NSLog(@"Error saving context: %@\n%@", [error localizedDescription], [error userInfo]);
      abort();
  }
  </code></pre>
  
  <p>The code works without error. My <code>persistentStoreCoordinator</code> and <code>managedObjectContext</code> code is same as <a href="https://github.com/project-imas/encrypted-core-data/blob/master/exampleProjects/IncrementalStore/Incremental%20Store%20Demo/ISDAppDelegate.m" rel="nofollow">this</a></p>
  
  <p>When I print the obj before closing the app it prints</p>
  
  <pre><code>2016-01-24 23:59:11.806 Chare Dev[10556:158617] &lt;CMCategories: 0x7feb00d24a90&gt; (entity: CMCategories; id: 0x7feb02ef5890 &lt;x-coredata://B947ACD3-E248-4D4F-B81E-236E100BB34D/CMCategories/p5&gt; ; data: {
      channels =     (
      );
      language = en;
      name = Professional;
      order = 0;
      uniqueId = 15;
  })
  </code></pre>
  
  <p>But after app restart, when we fetch all objects and print it prints like this</p>
  
  <pre><code>2016-01-24 23:59:11.795 Chare Dev[10556:158617] &lt;CMCategories: 0x7feb02de4aa0&gt; (entity: CMCategories; id: 0x7feb02de5c10 &lt;x-coredata://B947ACD3-E248-4D4F-B81E-236E100BB34D/CMCategories/p2&gt; ; data: {
      channels = "&lt;relationship fault: 0x7feb02922450 'channels'&gt;";
      language = nil;
      name = nil;
      order = nil;
      uniqueId = nil;
  })
  </code></pre>
  
  <p>And if I try to get a property  <code>NSString *string = obj.uniqueId</code></p>
  
  <blockquote>
    <p>2016-01-24 23:59:11.795 Chare Dev[10556:158617] CoreData: warning: An
    NSManagedObjectContext delegate overrode fault handling behavior to
    silently delete the object with ID '0x7feb02de5c10
    '
    and substitute nil/0 for all property values instead of throwing</p>
  </blockquote>
  
  <p>If I use <code>NSSQLiteStoreType</code> instead of <code>EncryptedStoreType</code> everything works fine. Can you guide me what am I doing wrong?</p>
  
  <p>Because due to above issue, database records are added multiple times and fetch request fails to fetch a managed object with uniqueId.</p>