• 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
Strange Managed Context Error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Strange Managed Context Error


  • Subject: Strange Managed Context Error
  • From: Colin Cornaby <email@hidden>
  • Date: Sat, 20 Aug 2005 10:19:26 -0700

I'm running the following code (it is inside a NSManagedObjectContent subclass):

NSFetchRequest *request = [[[NSFetchRequest alloc] init] autorelease];
NSEntityDescription *entity = [NSEntityDescription entityForName:@"EntityType" inManagedObjectContext:self];
[request setEntity:entity];
NSArray *entities = [self executeFetchRequest:request error:nil];
return entities;


However when it runs, it prints to the console when it tries to execute the fetch request:
"Exception raised during posting of notification. Ignored. exception: +entityForName: could not locate an NSManagedObjectModel"


The error would seem to be straight forward but the fetch request still returns the proper results and the code keeps going. I don't receive this error unless I've added or removed something of type "EntityType" after the program has finished launching, so I'm assuming something could be being released, but I don't know what would be. The managed object context must still be there, after all that is where this code is running from. I don't think the modal could be being released, after all I can still add other entity types and query for them just fine.

Does anybody have an general experience with this error? I'm stumped. Everything seems to be working just fine, the code still completes, but having this notification pop up every-time is kinda annoying. I don't see how there could be anything wrong with the managed object model if the query still completes just fine and returns the right results.

---------------------------
Colin Cornaby
ProToys - White Magic Labs - http://whitemagiclabs.com
Macintosh Specialist - University of Portland - htttp://up.edu


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Strange Managed Context Error
      • From: mmalcolm crawford <email@hidden>
  • Prev by Date: Re: using bless to change boot device
  • Next by Date: using bless to change boot device [more info requested]
  • Previous by thread: Re: using bless to change boot device
  • Next by thread: Re: Strange Managed Context Error
  • Index(es):
    • Date
    • Thread