Hi, i'm using Couchbase Lite Android, and i'm not sure what is the best way to delete documents.
One approach is to simply put a _deleted property into the document, but i'm afraid it will cause problems with conflict detection. For example: 1. Device A and device B both have revision 1-foo. 2. User on device A updates the document and produces 2-bar. 3. User on device B deletes the document and causes _deleted property to be set in the document, producing 2-baz. 4. Device A replicates to device B, so now it has 2-bar and 2-baz. CBLite won't say it's a conflict( if i'm right about getConflictingRevisions() ), but from the user's point of view it is a conflict. And if we'll try to find all leaf revisions( with getLeafRevisions() ), we won't be able to distinguish solved conflicts from unsolved conflicts. Also, i hoped that if i'll add a "_deleted: true" into the document instead of calling delete() (Like "Deleting documents with Filtered Replications" section of guide says) CBLite will retain document contents, but it seems it won't. I've tested that with curl PUT and subsequent curl GET and got only _id, _rev, and _deleted. So should i use my own property ( i.e. "deleted" without underscore ) to mark revisions which were deleted by user, and use _deleted only to mark revisions which were deleted during conflict resolution? -- 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/c4f86959-11cc-4f0e-80fb-490cc1d8d2c1%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
