In Memory Core Data Fails to Enforce Constraints

Originator:mikestubna
Number:rdar://28668254 Date Originated:Oct 7 2016
Status:Open Resolved:
Product:iOS Product Version:10.0
Classification:Serious bug Reproducible:yes
 
Summary: 
When using the In-Memory core data persistent store type, constraints aren't enforced

Steps to Reproduce:
1. Create a Core Data model with a constraint
2. Set up Core Data stack using the new NSPersistentContainer construct. Make sure main context has merge policy set.
3. When using SQL Lite type store type, constraints are enforced
4. When using In Memory store type, constraints are not enforced

See attached XCode project for two identical unit tests - the SQL Lite test passes, the In Memory test fails.

Expected Results:
In Memory store should enforce constraints

Actual Results:
In Memory store doesn't enforce constraints

Version:
XCode 8.0, iOS 10

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!