After adding a new version of the Core Data model to my application, I performed an easy migration, apparently successfully. The migrated file is loaded in order, but the first time you try to access the attribute through certain relationships, the application crashes with NSRangeException: '*** -[__NSArrayM objectAtIndex:]: index 4294967295 beyond bounds [0 .. 35]'. This relationship worked fine before migration. I know from other posts that 4294967295 is valid -1, but the only thing I can identify with 36 points in my application / data is that there are 36 common objects in the data model (for reference, the relation that is selected is 58 points in it table).
Question:
My question is, based on the error that I am getting and the troubleshooting that I performed below, is there a type of schema change that can transmit easy migration, but it distorts the data along the way, which leads to a noted exception? I will try to break the transition to smaller pieces across several versions in order to either isolate or avoid this problem, but it would be nice to focus on specific circuit changes that may be in malfunction.
Error:
The failure occurs with the following code in "myobject":
[[self object2] text];
object2 , , , . text, , , awakeFromFetch 2. [self object2] , data: <fault>.
:
sqlite3, :
- .
- object2 , (
ZMYOBJECT, , Z2_MYOBJECT, ). , . Z_PRIMARYKEY -1 Z_MAX, . Z_MAX . Z_SUPER .
, , - , .
:
, ( ). , - .
, -, , , .
, . , , .
(2/25/12): , , ( ) NSManagedObject NSManagedObject, . , , , , . .
:
, 36 , , "myobject" "object2", -1, . , [self object2] , .
?