title: Core Data Saving Error
body: <p>I'm trying to save some data to core data from a different view and I keep getting a error when I press the button to save the data. The that I get is:</p>
  
  <pre><code>Unresolved error (null), (null)
  </code></pre>
  
  <p>Here's all my code:</p>
  
  <p>SomeViewController.h</p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  @class NameData;
  @interface SomeViewController : UIViewController &lt;NSFetchedResultsControllerDelegate&gt; {
      NSFetchedResultsController *fetchedResultsController;
      NSManagedObjectContext* managedObjectContext;
      NameData *nameData;
  }
  @property (nonatomic,retain) NSFetchedResultsController *fetchedResultsController;
  @property (nonatomic,retain) NSManagedObjectContext* managedObjectContext;
  @property (nonatomic,retain) NameData *nameData;
  
  - (IBAction)saveData;
  
  @end
  </code></pre>
  
  <p>SomeViewController.m</p>
  
  <pre><code>#import "SomeViewController.h"
  #import  "NameData"
  
  @implementation SomeViewController
  
  @synthesize addTeam;
  
  - (void)viewDidLoad {
      [super viewDidLoad];
      self.title = @"Add Name;
  
  }
  
  - (IBAction)saveData{
  
      NSString *string = @"demo";
  
      nameData.nameContent = string;
      nameData.name2Content = string;
      nameData.name3Content = string;
  
  
      NSError *error = nil;
      if (![nameData.managedObjectContext save:&amp;error]) {
          // Handle error
          NSLog(@"Unresolved error %@, %@", error, [error userInfo]);
          abort();  // Fail
      }   
  }
  - (void)didReceiveMemoryWarning {
      // Releases the view if it doesn't have a superview.
      [super didReceiveMemoryWarning];
  
      // Release any cached data, images, etc that aren't in use.
  }
  
  - (void)viewDidUnload {
      // Release any retained subviews of the main view.
      // e.g. self.myOutlet = nil;
  }
  
  
  - (void)dealloc {
      [nameData release];
  }
  @end
  </code></pre>
  
  <p>NameData.h</p>
  
  <pre><code>#import &lt;CoreData/CoreData.h&gt;
  
  
  @interface NameData :  NSManagedObject  
  {
  }
  
  @property (nonatomic, retain) NSString * nameContent;
  @property (nonatomic, retain) NSString * name2Content;
  @property (nonatomic, retain) NSString * name3Content;
  @end
  </code></pre>
  
  <p>NameData.m</p>
  
  <pre><code>#import "NameData"
  
  @implementation NameData
  
  @dynamic nameContent;
  @dynamic name2Content;
  @dynamic name3Content;
  @end
  </code></pre>