> On Jul 17, 2015, at 1:17 PM, Brendan Duddridge <[email protected]> wrote: > > I have a property on my class called "values". It's an NSMutableDictionary. > > However, I guess the JSON parser doesn't like that it's mutable. Is there a > way to tell CBL on iOS that I want my values property to be mutable?
CBLModel doesn’t support mutable types. The problem is detecting changes — if you modify the contents of the dictionary, the dictionary property itself isn’t changed, so the model object doesn’t know it needs to save back to the database. (I believe Core Data’s NSManagedObject has the same limitation.) In general, mutable property objects are considered a bad idea by many people, because the owning object loses control over the property value, which can be mutated at any moment. (There’s been discussion of this on cocoa-dev recently.) —Jens -- You received this message because you are subscribed to the Google Groups "Couchbase Mobile" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/FC6534D6-524C-4854-9369-9006643CAEEA%40couchbase.com. For more options, visit https://groups.google.com/d/optout.
