It should be possible to create a new required 1:1 relationship

Number:rdar://12153321 Date Originated:8/22/2012
Status:Open Resolved:
Product:iPhone SDK Product Version:
Classification:Enhancement Reproducible:n/a
Core Data as shipped with iOS 5.0 requires that all new relationships in a versioned object model be optional. For lightweight migration, I can understand the reasoning behind this.

However, if I supply a custom mapping model and a custom entity mapping policy, I can fill in the needed value for a new relationship. In this case, I want to be able to mark the new relationship as NOT optional. When I know that a relationship must exist, and I have code to fill it in for existing data, I don't want to compromise the integrity of my data model. Making this new relationship optional then requires extra code to ensure it is assigned. This is silly when Core Data already has the code to validate this, if only it would let me use it.


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!