Core Data migration model generated with Xcode4.2.1 ignores inherited attributes

Originator:ivucica
Number:rdar://10765363 Date Originated:27-Jan-2012 04:48 PM
Status:Open Resolved:
Product:Developer Tools Product Version:4.2.1
Classification:UI/Usability Reproducible:Always
 
By using the New File wizard in Xcode 4.2.1, I created a mapping model to migrate from previous version of a Core Data data model. Both the previous and the new version contain several abstract entities such as Contact and Product. These have some child entities that inherit from them; for example, SupplierContact, ClientContact and EmployeeContact. These entities inherit properties such as firstName, lastName and company from the parent entity, Contact.

Mapping model created by the wizard does not create mapping for the abstract entities -- as expected. However, the inherited properties are ignored in child entities and mapping doesn't get autocreated for them in the file by the wizard.

So, when mapping from SupplierContact to SupplierContact, all attributes and relationships that were inherited from Contact are ignored and don't get mapped. This results in data loss and validation errors unless these attribute and relationship mapping is manually created.

Steps to Reproduce:
1. Create a versioned data model with entities that inherit attributes from other entities.
2. Run the program and let it create a persistent data store based on this first version of the mapping model.
3. Create a new version of the data model.
4. Try creating a mapping model between these two versions using the New File wizard.

Expected Results:
Newly created mapping model contains mapping definitions for inherited attributes.

Actual Results:
All mapping definitions for inherited attributes are omitted.

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!