From 2b6f73089dc3dff121fe3f5a63236c8fa9ce6878 Mon Sep 17 00:00:00 2001 From: Daniel Tull Date: Wed, 25 Jan 2012 10:57:29 +0000 Subject: [PATCH] Use @count to get the count of the array --- templates/machine.m.motemplate | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/machine.m.motemplate b/templates/machine.m.motemplate index d496d4e8..f570f6a7 100644 --- a/templates/machine.m.motemplate +++ b/templates/machine.m.motemplate @@ -199,14 +199,14 @@ const struct <$managedObjectClassName$>FetchedProperties <$managedObjectClassNam fetchRequest.entity = [NSEntityDescription entityForName:@"<$Relationship.destinationEntity.name$>" inManagedObjectContext:self.managedObjectContext]; fetchRequest.predicate = [NSPredicate predicateWithFormat:@"<$Relationship.inverseRelationship.name$> <$if Relationship.inverseRelationship.isToMany$>CONTAINS<$else$>==<$endif$> %@", self]; fetchRequest.sortDescriptors = sortDescriptors; - <$if indexedNoninheritedAttributes.count > 0$> + <$if indexedNoninheritedAttributes.@count > 0$> NSArray *indexedIDs = [NSArray arrayWithObjects:<$foreach Attribute indexedNoninheritedAttributes do$>self.<$Attribute.name$>, <$endforeach do$>nil]; NSString *cacheName = [NSString stringWithFormat:@"mogenerator.<$managedObjectClassName$>.%@.<$Relationship.name$>.%@", indexedIDs, sortDescriptors]; <$endif$> return [[NSFetchedResultsController alloc] initWithFetchRequest:fetchRequest managedObjectContext:self.managedObjectContext sectionNameKeyPath:nil - cacheName:<$if indexedNoninheritedAttributes.count > 0$>cacheName<$else$>nil<$endif$>]; + cacheName:<$if indexedNoninheritedAttributes.@count > 0$>cacheName<$else$>nil<$endif$>]; } <$endif$> <$endforeach do$>