Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Use @count to get the count of the array

  • Loading branch information...
commit b2ce79b9304fc535e0f91c16847028ef744b38b8 1 parent a228310
Daniel Tull danielctull authored

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. +2 2 templates/machine.m.motemplate
4 templates/machine.m.motemplate
@@ -199,14 +199,14 @@ const struct <$managedObjectClassName$>FetchedProperties <$managedObjectClassNam
199 199 fetchRequest.entity = [NSEntityDescription entityForName:@"<$Relationship.destinationEntity.name$>" inManagedObjectContext:self.managedObjectContext];
200 200 fetchRequest.predicate = [NSPredicate predicateWithFormat:@"<$Relationship.inverseRelationship.name$> <$if Relationship.inverseRelationship.isToMany$>CONTAINS<$else$>==<$endif$> %@", self];
201 201 fetchRequest.sortDescriptors = sortDescriptors;
202   - <$if indexedNoninheritedAttributes.count > 0$>
  202 + <$if indexedNoninheritedAttributes.@count > 0$>
203 203 NSArray *indexedIDs = [NSArray arrayWithObjects:<$foreach Attribute indexedNoninheritedAttributes do$>self.<$Attribute.name$>, <$endforeach do$>nil];
204 204 NSString *cacheName = [NSString stringWithFormat:@"mogenerator.<$managedObjectClassName$>.%@.<$Relationship.name$>.%@", indexedIDs, sortDescriptors];
205 205 <$endif$>
206 206 return [[NSFetchedResultsController alloc] initWithFetchRequest:fetchRequest
207 207 managedObjectContext:self.managedObjectContext
208 208 sectionNameKeyPath:nil
209   - cacheName:<$if indexedNoninheritedAttributes.count > 0$>cacheName<$else$>nil<$endif$>];
  209 + cacheName:<$if indexedNoninheritedAttributes.@count > 0$>cacheName<$else$>nil<$endif$>];
210 210 }
211 211 <$endif$>
212 212 <$endforeach do$>

0 comments on commit b2ce79b

Please sign in to comment.
Something went wrong with that request. Please try again.