ios - Fetch request template - fetch all objects -
I'm starting with fetch request templates, so I'll do my best to explain.
I have created a fetch request template:
and trying to print all the items in a method below:
- (zero) printofflineactivities {EntityManager * entityManager = [[EntityManager alloc] init]; ActivityFetcher * Activity Fetcher = [[Activity Alloc] initWithEntityManager: entityManager]; Activity * activity = [activityfatter activitiesofline: [nsnumber number whitabulls: yes]]; NSLog (@ "print ..% @", activity.name); } The Kodoflain activities
- (activity *) Gtividhionoflain: (Ansanmber *) offline {Ansdineshn * Variables = [Ansdisd Square dictionary with object : Offline Offline: OfflineTemplatePlaceholder]; NSFetchRequest * Request = [entityManager fetchRequestFromTemplateWithName: ActivityOfflineReplacementWeb: variable]; Activity * activity = [entityManager entityForFetchRequest: request]; Return activity; } But it only prints the final value. I'm not sure how to print all the activities that satisfy the condition / expression?
-
Request requests should look like a template ( variable $ (example $ VARIABLE_NAME) ):
-
get fetch request must model like below:
NSFetchRequest * request = [self Knirmit object Contekskprisistent Story Coordinator. Managed Object Feld fetchRequestFromTemplateWithName: @ "Activity Offline" replacementable: @ {@ "ANY_VARIABLE_NAME": offline}];
Comments
Post a Comment