Lightweight migration of a NSPersistentDocument

Solution 1:

The compiled .momd resources can be loaded after an "existingPartner" fetch request is changed from:

name == $name

to:

name == $NAME

It's counterintuitive that a part of the object model that does not affect the persistence of data breaks versioning and lightweight migration. It's clear from the documentation that this should not be the case:

Core Data’s perspective on versioning is that it is only interested in features of the model that affect persistence.

Use the power of the CHOCKLOCK to fix your Fetch Requests or delete them completely and rely on NSPredicates created in code.

Solution 2:

I think you need to store the managed object model in an instance variable. You are returning an autoreleased object, which is what is probably causing the bad access.

Solution 3:

Based on your theory that it is an issue with the MOMC, Do you have any validation rules in the mom?

I have seen reports where validation rules do not survive the 4.x MOMC.