Hello,
I have a NSManagedObject with a NSMutableArray as attribute:
@interface MyObject : NSManagedObject
{
}
@property (nonatomic, retain) id a1;
In the data model it is declared as Transformable
. I left the Value Transformer field like it is with the default (in light grey) NSKeyedUnarchiveFromData
.
a1 is created as part of theObject:
MyObject *theObject = [NSEntityDescription insertNewObjectForEntityForName:@"MyObject" inManagedObjectContext: myManagedObjectContext];
and initialized:
a1 = [[NSMutableArray alloc] init];
Objects are added to a1 with [a1 insertObject:[NSNumber numberWithInt:0] atIndex: 0 ];
Then I save the context after all that. Loading the context back all elements stored in a1 are saved and loaded. ALL WORKS WELL!
BUT when now a1 CHANGES, for example by adding one more element to a1 or changing any element within a1 and the context is being saved and loaded back, the content of a1 is UNCHANGED (it remains exactly as it was before all changes happened). CHANGES DON'T WORK!
By the way, while the app is running, all changes to a1 ARE STORED in a1.
Please, can you help - what is going on here?
Thanks ver much for your help!