Core Data class generation doesn't respect optional properties in Swift

Number:rdar://21098402 Date Originated:25 May 2015
Status:Open Resolved:
Product:Xcode Product Version:6.3.2 (6D2105)
Classification:Serious bug Reproducible:Always
When generating an NSManagedObject subclass in Swift for an entity in Core Data, if a an attribute is marked as optional then its corresponding property should be generated as an optional. That is, "Type?" instead of "Type"

Steps to Reproduce:
1. Create an entity in Core Data with optional attributes
2. Generate NSManagedObject subclass
3. Note that property is not optional

Expected Results:
For example, Xcode should generate this:

class TestEntity: NSManagedObject {

    @NSManaged var myString: String? // optional in core data


Actual Results:
Instead, Xcode generates this:

class TestEntity: NSManagedObject {

    @NSManaged var myString: String // optional in core data


Version 6.3.2 (6D2105)


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!