Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix ordered relationships #66

Merged
merged 1 commit into from

2 participants

Martin Schürrer Jonathan 'Wolf' Rentzsch
Martin Schürrer

Set accessor generates wrong mutableSet method

Jonathan 'Wolf' Rentzsch rentzsch merged commit 4cab306 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 12, 2011
  1. Martin Schürrer
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 0 deletions.
  1. +4 −0 templates/machine.m.motemplate
4 templates/machine.m.motemplate
View
@@ -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;
}
Something went wrong with that request. Please try again.