Is the method truly CBLModel propertiesToSave:? I can't override that one 
(I don't see it in the docs and i't doesn't autocomplete). I can override 
propertiesToSave (it's documented and it does autocomplete). Problem is, 
CBLModel propertiesToSave doesn't get called during CBLModel save:.

On Thursday, February 13, 2014 8:25:46 PM UTC-8, Jens Alfke wrote:
>
> Overriding -save: like that isn't going to work. The two immediate 
> problems I see are: 
> (1) In the encrypted case you don't call the original save method, so in 
> turn -didSave doesn't get called, which does some important bookkeeping 
> like clearing the needsSave flag. 
> (2) There are code paths, like through +saveModels:error: and 
> -[CBLDatabase saveAllModels], that don't call -save: but call the internal 
> method -justSave: instead, so your code won't get called. 
>
> It'd be much better if you override -propertiesToSave: instead. Just call 
> super, change the returned dictionary into one with the encrypted data, and 
> return that. 
>
> —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/63448a99-499d-41a4-8786-12c96ac9f429%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to