From d0f28ab3354af852d3470adccaf392fbd7c6129c Mon Sep 17 00:00:00 2001 From: Jonathan del Strother Date: Fri, 8 Oct 2010 11:23:51 +0100 Subject: [PATCH] Update machine templates to include fetched properties Include nzhuk's fetched properties in the default templates Signed-off-by: Jonathan del Strother --- templates/machine.h.motemplate | 3 +++ templates/machine.m.motemplate | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/templates/machine.h.motemplate b/templates/machine.h.motemplate index 95c55191..613b46f5 100644 --- a/templates/machine.h.motemplate +++ b/templates/machine.h.motemplate @@ -46,6 +46,9 @@ + (NSArray*)fetch<$FetchRequest.name.initialCapitalString$>:(NSManagedObjectContext*)moc_ <$foreach Binding FetchRequest.bindings do2$><$Binding.name$>:(<$Binding.type$>)<$Binding.name$>_ <$endforeach do2$>error:(NSError**)error_; <$endif$> <$endforeach do$> +<$foreach FetchedProperty noninheritedFetchedProperties do$> +@property (nonatomic, readonly) NSArray *<$FetchedProperty.name$>; +<$endforeach do$> @end @interface _<$managedObjectClassName$> (CoreDataGeneratedAccessors) diff --git a/templates/machine.m.motemplate b/templates/machine.m.motemplate index 3776bf34..d76d64d4 100644 --- a/templates/machine.m.motemplate +++ b/templates/machine.m.motemplate @@ -67,6 +67,10 @@ <$endif$> <$endforeach do$> +<$foreach FetchedProperty noninheritedFetchedProperties do$> +@dynamic <$FetchedProperty.name$>; +<$endforeach do$> + <$foreach FetchRequest prettyFetchRequests do$> <$if FetchRequest.singleResult$> + (id)fetch<$FetchRequest.name.initialCapitalString$>:(NSManagedObjectContext*)moc_ <$foreach Binding FetchRequest.bindings do2$><$Binding.name$>:(<$Binding.type$>)<$Binding.name$>_ <$endforeach do2$>{