• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Saving Managed Object Context
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Saving Managed Object Context


  • Subject: Saving Managed Object Context
  • From: "Ayers, Joseph" <email@hidden>
  • Date: Mon, 23 Aug 2010 12:33:32 -0400
  • Acceptlanguage: en-US
  • Thread-topic: Saving Managed Object Context

Attempting to save a NSManagedObjectContext with:

  NSError *error = nil;
  if (![[self managedObjectContext] save: &error]) {
  NSLog(@"Error while saving\n%@",
([error localizedDescription] != nil) ? [error localizedDescription]: @"Unknown Error");

Results in:

2010-08-22 20:31:32.385 Roboplasm[3508:a0f] Error while saving
TapeList is a required value.

TapeList is the base entity in my object graph and is inserted into the context with:

NSManagedObjectModel *mom = [self managedObjectModel];
...
NSEntityDescription *tapeListEntity = [[mom entitiesByName] objectForKey:@"TapeList"];
NSLog(@"TapeList Entity: %@", tapeListEntity);
// [self setValue:tapeListEntity forKey:@"TapeList"];
        [self setTapeList:[NSEntityDescription insertNewObjectForEntityForName:@"TapeList" inManagedObjectContext:[self managedObjectContext]]];


Any idea what's going on here?

Thanks,
Joseph Ayers
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Saving Managed Object Context
      • From: Quincey Morris <email@hidden>
  • Prev by Date: Hidden file and 64bits Cocoa
  • Next by Date: Re: Hidden file and 64bits Cocoa
  • Previous by thread: Re: Hidden file and 64bits Cocoa
  • Next by thread: Re: Saving Managed Object Context
  • Index(es):
    • Date
    • Thread