title: Printing Core Data
body: <p>I'm working on a program and I have created a fetch request to grab the data that I need to print.  I'm able to log information like this:</p>
  
  <pre><code>2010-10-03 16:57:10.362 lzshow7.2[2537:10b] &lt;NSManagedObject: 0x2ca120&gt; (entity: Song; id: 0x2afcb0 &lt;x-coredata://CF5A85CE-BE0F-4ADC-979A-7F4214A8FB19/Song/p9&gt; ; data: {
      cueName = Freedom;
      cueNo = 014;
      cueNotes = nil;
      songToInstrument = "&lt;relationship fault: 0x2b1800 'songToInstrument'&gt;";
  })
  </code></pre>
  
  <p>How do I seperate the properties like cueName, cueNo, cueNotes out to be printed?  </p>
  
  <p>Here is the fetch request:</p>
  
  <pre><code> //Managed object context???
   NSLog(@"setting Managed object stuff");
   NSManagedObjectContext *context=[[[NSDocumentController sharedDocumentController] currentDocument] managedObjectContext];
   NSLog(@"Second line of Managed object stuff");
  
  
  
  
  
  
   //fetch request:  
   NSLog(@"Starting to fetch:");
  
   NSFetchRequest *request = [[NSFetchRequest alloc] init];
   NSEntityDescription *entity = [NSEntityDescription entityForName:@"Song" inManagedObjectContext:context];
   [request setEntity:entity];
   NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"cueNo" ascending:YES];
   NSArray *sortDescriptors = [[NSArray alloc] initWithObjects:sortDescriptor, nil];
   [request setSortDescriptors:sortDescriptors];
   [sortDescriptors release];
   [sortDescriptor release];
   NSError *error;
   NSMutableArray *mutableFetchResults = [[context executeFetchRequest:request error:&amp;error] mutableCopy];
  
  
  
   for (id obj in mutableFetchResults)
    NSLog(@"%@", obj);
  
   NSLog(@"finished looping");
   //Error handling
  
   if (mutableFetchResults == nil) {
  
    // Handle the error.
  
   }
  
   //[self setEventsArray:mutableFetchResults];
   [mutableFetchResults release];
   [request release];
  
  
  }
  </code></pre>
  
  <p>Any help would be greatly appreciated.</p>
  
  <p>Thank you,</p>
  
  <p>Loren</p>