Core Data is working pretty smoothly in my app. I can store and retrieve most of the data needed. However,
- One object (ObjectW) hits awakeFromInsert, but never executes awakeFromFetch – data is never unarchived.
- Another object (ObjectX) executes awakeFromFetch fine – and data is unarchived.
Both ObjectW and ObjectX are stored in ObjectY. Neither one has an explicit call to awakeFromFetch, just a reference to some properties.
- (void) awakeFromInsert {
[super awakeFromInsert];
}
- (void) awakeFromFetch {
NSLog(@"AWAKE FROM FETCH");
[super awakeFromFetch];
}
Something went wrong. Where do I look?
Good discussion here
http://www.cocoabuilder.com/archive/cocoa/154453-awakefromfetch-when-it-is-called.html
In summary: check to see if the method is capitalized and spelled correctly. If so, the awakeFromFetch is not actually executed until an attribute that is defined in the model is accessed. Note it can be an actual attribute or defined as transient.
Good luck!