Hi, I have a CoreData model in my iPhone app, which is linked to a SQL Database with more than 50k records. When I generate the records classes, Xcode uses the @dynamic directive for properties. I have a property named "ISFAV", NSNumber type (CoreData does not use BOOL or Integer, it uses object types). Being short, I change the ISFAV property when the user taps on a button in this way:
if (![record.ISFAV intValue])
record.ISFAV=[NSNumber numberWithInt:1];
else record.ISFAV=[NSNumber numberWithInt:0];
Quite simple. But if I try to tap many times on the same button sequentially, the iPhone takes too much time (the button remains in the hold state for a time that increase progressively). This happens even if I change record, adding\removing many records from favorites sequentially (instead of adding\deleting the same record from favorites).
If I change the original accessor method to @synthesize, the problem seems to be solved.
Is it correct to use the synthesize directive for accessor methods in CoreData?
Thank you very much!
@edit Using the synthesize directive, no changes are made to the CoreData model when I save the context :-\ The problem is still unsolved :-\