I'm following this how-to to implement Core Data storage in my app:
I have a Model.xcdatamodel
which defines a Something
model. I've used XCode to generate a class for that model.
I've imported the class in my .m file where I'm trying to:
Something* s = (Something *)[NSEntityDescription insertNewObjectForEntityForName:@"Something" inManagedObjectContext:managedObjectContext];
But this causes the following error:
2009-10-13 21:18:11.961 w9a[4840:20b] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '+entityForName: could not locate an NSManagedObjectModel for entity name 'Something''
Am I missing something?