Using an ExecuteFetchRequest in a Core Data Document-based Application
Using an ExecuteFetchRequest in a Core Data Document-based Application
- Subject: Using an ExecuteFetchRequest in a Core Data Document-based Application
- From: "Ernest Schaal" <email@hidden>
- Date: Wed, 11 Jul 2007 12:34:13 +0900
I have been having trouble the past couple of days finding how to use
a fetch request in core data model. I figured out how to enter the
fetch request into the model, and I got to the point where I defined a
fetch request, but the line with the executeFetchRequest is the
problem.
Here is the pertinent code:
NSManagedObjectModel *model = [self managedObjectModel];
NSFetchRequest *fetch = [model fetchRequestTemplateForName:@"warning"];
NSLog ([fetch description]);
// Used to see if the fetch request was okay in format
NSError *error = nil;
NSArray *eventsDue = [model executeFetchRequest:fetch error:&error];
...
I know that "model" is not the right term, nether are
"ManagedObjectContext" or "Context". I just don't know what the right
term is.
I have googled "executeFetchRequest model" and found very little on it.
Please tell me what I should be doing.
_______________________________________________
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