Skip to content

Commit

Permalink
Make property optional only if to-one relationship marked as optional…
Browse files Browse the repository at this point in the history
… (swift).
  • Loading branch information
rokgregoric committed Aug 20, 2014
1 parent 6233fae commit fa1c236
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/machine.swift.motemplate
Expand Up @@ -83,7 +83,7 @@ class _<$managedObjectClassName$>: <$customSuperentity$> {

<$else$>
@NSManaged
var <$Relationship.name$>: <$Relationship.destinationEntity.managedObjectClassName$>?
var <$Relationship.name$>: <$Relationship.destinationEntity.managedObjectClassName$><$if Relationship.isOptional$>?<$endif$>

// func validate<$Relationship.name.initialCapitalString$>(value: AutoreleasingUnsafePointer<AnyObject>, error: NSErrorPointer) {}
<$endif$>
Expand Down

0 comments on commit fa1c236

Please sign in to comment.