Skip to content

Commit

Permalink
Adding keyPathsForValuesAffectingValueForKey for scalar *Value proper…
Browse files Browse the repository at this point in the history
…ties.
  • Loading branch information
tonyarnold committed Nov 11, 2010
1 parent 12298a8 commit fdc4a02
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions templates/machine.m.motemplate
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,17 @@
return (<$managedObjectClassName$>ID*)[super objectID];
}

+ (NSSet *)keyPathsForValuesAffectingValueForKey:(NSString *)key {
NSSet *keyPaths = [super keyPathsForValuesAffectingValueForKey:key];
<$foreach Attribute noninheritedAttributes do$><$if Attribute.hasDefinedAttributeType$><$if Attribute.hasScalarAttributeType$>
if ([key isEqualToString:@"<$Attribute.name$>Value"]) {
NSSet *affectingKey = [NSSet setWithObject:@"<$Attribute.name$>"];
keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey];
}<$endif$><$endif$><$endforeach do$>

return keyPaths;
}

<$foreach Attribute noninheritedAttributes do$>
<$if Attribute.hasDefinedAttributeType$>

Expand Down

0 comments on commit fdc4a02

Please sign in to comment.