On Oct 7, 2015, at 1:58 PM, Brendan Duddridge 
<[email protected]<mailto:[email protected]>> wrote:

So does that mean that I can somehow get the deleted revision from the model 
object and somehow reconstitute the CBLDocument that this model object used to 
refer to?

The .document property should still be valid. You could reconstitute the 
previous revision by getting its contents and then saving those as a new 
revision. Just be aware that there’s no guarantee the previous revision’s body 
will still be available — if the database has compacted after the deletion, 
it’ll be gone. (With SQLite you’d have to manually compact it, but ForestDB 
databases now auto-compact in the background.) The only way to reliably restore 
the old revision would be if you cached it in your undo object.

—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/1F98509B-329D-4B29-B5E8-D23D51C6E640%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to