I'm trying to figure out if there's a better way than using my workaround in this situation: I have a preferences class (CBLModel subclass) which has a "reminders" property, an NSArray of Reminder objects which adheres to CBLJSONEncoding. Now whenever I change one of the reminder objects and then call "save:" on the preferences model, it doesn't re-encode the reminders because it doesn't know that it should re-save its "reminders" property. My workaround:
NSArray *reminders = _prefs.reminders;
_prefs.reminders = nil;
_prefs.reminders = reminders;
if (![_prefs save:&error]) {
...
}
I haven't found a way to mark a specific property dirty on the model, is there a way?
Cheers