XCode: NSManagedObject subclass generation does not create fetched properties

Originator:quellish
Number:rdar://14311065 Date Originated:24 Jun 2013
Status:Open Resolved:
Product:Developer Tools Product Version:5,6
Classification:Serious bug Reproducible:Always
 
Summary:
When generating an NSManagedObject subclass from a Core Data Entity having fetched properties in XCode's Core Data Data Model Editor, fetched properties are not included in the output representation.

Steps to Reproduce:
1. Add a Core Data Model to an XCode project.
2. Add an Entity to the model.
3. Enter a fetched property, with predicate, to the Entity.
4. From the Editor menu, select "Create NSManagedObject Subclass..."
5. Generate the class. Output will look something like this:

Header:
@interface Entity : NSManagedObject


@end

Implementation:

@implementation Entity


@end

Expected Results:

Header:
@interface Entity : NSManagedObject

@property (nonatomic, retain) NSArray *someFetchedProperty;

@end

Implementation:

@implementation Entity

@dynamic someFetchedProperty;

@end

Actual Results:

Generated class:

@interface Entity : NSManagedObject


@end

Implementation:

@implementation Entity


@end

Regression:

This has been the case not only for XCode 5, but all previous versions of XCode 4 that I can recall. Definitely in 4.6.3.

Notes:
This is particularly applicable to developers who are attempting to separate user data from application data in core data by maintaining stores in two locations using fetched properties.

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!