Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Use @count to get the count of the array

  • Loading branch information...
commit b2ce79b9304fc535e0f91c16847028ef744b38b8 1 parent a228310
@danielctull danielctull authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 templates/machine.m.motemplate
View
4 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$>
Please sign in to comment.
Something went wrong with that request. Please try again.