testRemoteConflictResolution()<https://github.com/couchbase/couchbase-lite-android/blob/master/src/androidTest/java/com/couchbase/lite/replicator/ReplicationTest.java#L1230-L1297> introduces a conflict by adding a "_deleted" property. It also has an assertion that calls getConflictingRevisions().
Can you try to modify testRemoteConflictResolution()<https://github.com/couchbase/couchbase-lite-android/blob/master/src/androidTest/java/com/couchbase/lite/replicator/ReplicationTest.java#L1230-L1297>, or add an entirely new test, to reproduce the issue you are seeing? If you can reproduce, please file a github issue. On Fri, May 9, 2014 at 8:17 AM, Pavel Malyshev <[email protected]> wrote: > 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<https://groups.google.com/d/msgid/mobile-couchbase/c4f86959-11cc-4f0e-80fb-490cc1d8d2c1%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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/CACSSHCHgbykAarcf1MgvsZa21Qd1GZ-1YbTTWTufFUGjDOhJzw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
