Swift Core data generated properties relationship improvement

Originator:Stephen.Schale
Number:rdar://25630653 Date Originated:4/8/16
Status:Open Resolved:
Product:Xcode Product Version:7.3 (7D175)
Classification: Reproducible:Always
 
Summary:
Currently, when creating a to-many relationship in Core Data, when the NSManagedObject CoreDataProperties.swift file is generated, these relationships are described as @NSManaged var relationship: NSSet. This is very unhelpful, and the generated Objective C code even is declared as NSSet<MyClass *> *relationship.

Changing the CoreDataProperties.swift declaration to @NSManaged var relationship: Set<MyClass> works just fine, as NSSet and <Set> are bridged. Having a native Set declaration significantly simplifies Swift code that accesses it.

 Please change how the CoreDataProperties file is generated. Thank you.

Steps to Reproduce:
1. Create two classes in Core Data
2. Create a to-many relationship
3. Editor -> Create NSManagedObject Subclass...
4. Create files in Swift

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com 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!