How to get conflicts

Couchbase Server doesn’t know about conflicts (or revisions at all, for that matter.) So a Couchbase Server map function will never see a _conflicts property the way it would in CouchDB. There isn’t currently a practical way to detect conflicts in a view, since the revision information is buried inside an opaque property (managed by Sync Gateway) inside the document.

In any case, it’s more common to deal with conflicts on the client side because resolving them often requires user interaction. Couchbase Lite has APIs for detecting and resolving conflicts; see the docs. If you’re using PhoneGap, you’d do it the CouchDB way, with a client-side view that checks the _conflicts property.

1 Like