Skip to content
This repository

Fix ordered relationships #66

Merged
merged 1 commit into from almost 3 years ago

2 participants

Martin Schürrer Jonathan 'Wolf' Rentzsch
Martin Schürrer
MSch commented July 12, 2011

Set accessor generates wrong mutableSet method

Jonathan 'Wolf' Rentzsch rentzsch merged commit 4cab306 into from July 12, 2011
Jonathan 'Wolf' Rentzsch rentzsch closed this July 12, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Jul 12, 2011
Martin Schürrer mutableSetValueForKey -> mutableOrderedSetValueForKey in ordered
relationships
c7e47fc
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 4 additions and 0 deletions. Show diff stats Hide diff stats

  1. 4  templates/machine.m.motemplate
4  templates/machine.m.motemplate
@@ -71,7 +71,11 @@
71 71
 	<$if Relationship.isToMany$>
72 72
 - (<$Relationship.mutableCollectionClassName$>*)<$Relationship.name$>Set {
73 73
 	[self willAccessValueForKey:@"<$Relationship.name$>"];
  74
+  <$if Relationship.isOrdered$>
  75
+	<$Relationship.mutableCollectionClassName$> *result = (<$Relationship.mutableCollectionClassName$>*)[self mutableOrderedSetValueForKey:@"<$Relationship.name$>"];
  76
+  <$else$>
74 77
 	<$Relationship.mutableCollectionClassName$> *result = (<$Relationship.mutableCollectionClassName$>*)[self mutableSetValueForKey:@"<$Relationship.name$>"];
  78
+  <$endif$>
75 79
 	[self didAccessValueForKey:@"<$Relationship.name$>"];
76 80
 	return result;
77 81
 }
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.