Skip to content

Commit

Permalink
Add means to access mutable versions of relationships
Browse files Browse the repository at this point in the history
  • Loading branch information
beccadax committed Sep 2, 2014
1 parent cb09202 commit 48b1b9b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions templates/machine.swift.motemplate
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ class _<$managedObjectClassName$>: <$customSuperentity$> {
@NSManaged
var <$Relationship.name$>: <$Relationship.immutableCollectionClassName$>

var mutable<$Relationship.name.initialCapitalString$>: <$Relationship.mutableCollectionClassName$> {
return mutable<$if Relationship.jr_isOrdered$>Ordered<$endif$>SetValueForKey("<$Relationship.name$>")
}
<$else$>
@NSManaged
var <$Relationship.name$>: <$Relationship.destinationEntity.managedObjectClassName$><$if Relationship.isOptional$>?<$endif$>
Expand Down

0 comments on commit 48b1b9b

Please sign in to comment.