Re: Crash as NSPersistentDocument creates its persistence stack
Re: Crash as NSPersistentDocument creates its persistence stack
- Subject: Re: Crash as NSPersistentDocument creates its persistence stack
- From: mmalc Crawford <email@hidden>
- Date: Wed, 07 Jan 2009 10:40:14 -0800
On Jan 7, 2009, at 9:56 AM, Jerry Krinock wrote:
Problem ID number 6478155.
Using the project as provided, you get the same error --
2009-01-07 09:40:51.689 DepartmentAndEmployees[27205:10b]
+entityForName: could not locate an entity named 'Department' in this
model.
whichever of Model1 and Model2 you include in the build.
The error seems to correctly describe the problem... Department is in
a separate model (MyDocument) that you must include in order for the
entity to be found in:
- (id)initWithType:(NSString *)type error:(NSError **)error
// ...
[self setDepartment:[NSEntityDescription
insertNewObjectForEntityForName:@"Department"
inManagedObjectContext:managedObjectContext]];
If you include the MyDocument model, the application builds and runs
whether you include either or neither of the other two models.
mmalc
_______________________________________________
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