But doing this sets a field called _deleted = true on the document. Sync gateway does not allow any client to set internal fields (anything starting with _) so any revision handled this way is rejected by sync gateway and thus if the same conflict is later synced to a different device it has to handle it again. Is there a better way to handle conflicts in couchbase lite when we are also using sync gateway?
My mistake about the deleted flag specifically though. When I tried to save with that it was ok, but if I use any other _ field I get this error:
“error”: “Bad Request”,
“reason”: "user defined top level properties beginning with '’ are not allowed in document body"
Is that what you would expect to see for a deleted revision though? A stub with just _deleted, id, and _rev fields? I don’t want to allow it in the database unless it is what a deleted revision from the app is supposed to look like that.