title: Fetching with an id in Core Data
body: <p>I have a Core Data in my application. One of the entity is <code>Details</code>. <code>Details</code> have 2 attributes named <code>guid</code> and the other is <code>details</code>. Both attributes contain a lot of values. At the point of fetching, I have to take the <code>details</code> of the corresponding <code>guid</code>. Can I get the values that saved in the other attribute with the guid? How can I connect these two attributes? This is how I am saving values to 2 attributes.</p>
  
  <pre><code>ReaderAppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
  
  NSManagedObjectContext *context = [appDelegate managedObjectContext];
  
  NSManagedObject *object;
  object = [NSEntityDescription insertNewObjectForEntityForName:@"Details" inManagedObjectContext:context];
  
  [object setValue: [[activity objectForKey:@"category_guid"]stringValue]forKey:@"guid"];
  [object setValue:[activity objectForKey:@"details"] forKey:@"details"];
  
  NSError *error;            
  if (![context save:&amp;error]) {
  
      NSLog(@"Error save base");
  }
  else {
  
      NSLog(@"saved");                
  }
  </code></pre>