diff --git a/templates/machine.m.motemplate b/templates/machine.m.motemplate index 39fa43ad..704376ab 100644 --- a/templates/machine.m.motemplate +++ b/templates/machine.m.motemplate @@ -71,7 +71,11 @@ <$if Relationship.isToMany$> - (<$Relationship.mutableCollectionClassName$>*)<$Relationship.name$>Set { [self willAccessValueForKey:@"<$Relationship.name$>"]; + <$if Relationship.isOrdered$> + <$Relationship.mutableCollectionClassName$> *result = (<$Relationship.mutableCollectionClassName$>*)[self mutableOrderedSetValueForKey:@"<$Relationship.name$>"]; + <$else$> <$Relationship.mutableCollectionClassName$> *result = (<$Relationship.mutableCollectionClassName$>*)[self mutableSetValueForKey:@"<$Relationship.name$>"]; + <$endif$> [self didAccessValueForKey:@"<$Relationship.name$>"]; return result; }