The answer to this question may be “That’s just the way it is”, but it’s something that’s been bugging me.
Whenever I go to type an NSFetchRequest execute, I always start like this:
NSArray *array = [request executeFetchRequest];
and then remember that it doesn’t work like this. I have to execute it against the managed object complex instead, like this:
NSArray *array = [moc executeFetchRequest:request error:&error];
The first way seems more logical to me, since we already know what the managed object complex is, after giving it here:
[request setEntity: [NSEntityDescription entityForName:@"Recipe" inManagedObjectContext:moc]];
Is there any reason for the pattern Apple uses?