- I have set up Core Data stack with some validations for entity properties;
- Store some managed objects to sqlite file;
- Manually corrupt managed object data in the sqlite file so they would fail to validate with validation predicates.
However I can still the fetch objects with invalid values after that.
My question is whether it possible to validate the sqlite file so I that ensure I am fetching managed object with valid values?
I know that addPersistentStoreWithType:configuration:URL:options:error: check for schema integrity, but I would like to check whether stored data validates with model.
NSValidateXMLStoreOptionfor XML, but there is nothing for sqlite as far as I know. - Kirsteins