From c7e47fc76ec8d2e9a6f1bb6efc4874bdbcb055ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Schu=CC=88rrer?= Date: Tue, 12 Jul 2011 12:26:46 +0200 Subject: [PATCH] mutableSetValueForKey -> mutableOrderedSetValueForKey in ordered relationships --- templates/machine.m.motemplate | 4 ++++ 1 file changed, 4 insertions(+) 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; }