Skip to content

Commit

Permalink
Merge pull request rentzsch#66 from MSch/master
Browse files Browse the repository at this point in the history
[FIX] Use mutableOrderedSetValueForKey for ordered relationships. (Martin Schürrer)
  • Loading branch information
rentzsch committed Jul 12, 2011
2 parents 8207b9c + ad405de commit ec9e160
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions templates/machine.m.motemplate
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit ec9e160

Please sign in to comment.