> On Sep 23, 2014, at 1:46 PM, MobDev <[email protected]> wrote:
> 
>         [doc putProperties:[doc userProperties] error:&error];

This is a no-op. You're taking the existing document properties and saving them 
as the new properties without making any changes.

Maybe you're getting confused about the difference between document and model 
properties. A document supports updating the properties all at once, via 
-putProperties: or -update:. That creates a new revision. Because the 
all-at-once save can be awkward to use, CBLModel provides a layer above this 
that provides mutable state, where you can change properties one at a time and 
then save. It does this by storing the mutable state in the model object, and 
not writing anything to the document until you save.

Basically, CBLDocument isn't aware of any changes made to its CBLModel until 
you save them. Those are temporary changes that are just stored in the model 
itself.

—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/7693C68D-72F6-4E23-B497-1405E28A0F38%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to