Skip to content

Commit

Permalink
Update machine templates to include fetched properties
Browse files Browse the repository at this point in the history
Include nzhuk's fetched properties in the default templates

Signed-off-by: Jonathan del Strother <jon.delStrother@audioboo.fm>
  • Loading branch information
Jonathan del Strother authored and Jonathan del Strother committed Oct 8, 2010
1 parent 03d0050 commit d0f28ab
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions templates/machine.h.motemplate
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions templates/machine.m.motemplate
Original file line number Diff line number Diff line change
Expand Up @@ -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$>{
Expand Down

0 comments on commit d0f28ab

Please sign in to comment.