I have read a lot about handling sync conflicts in Couchbase but all the documentation says it happens on the level of a document. Not on the field level. For example:
User A puts a document on the server
User B gets the same docment
Both users are offline
User A sets field 1 of the document to “A”
User B sets fields 2 of the document to “B”
User A and user B go online and synchronize.
What happens is that 1 change gets lost (the one from User A or B dependend on the sync strategy). But we don’t want that. I guess it should not be the problem to compare the fields on the server and update everything that has changed from a client to the server database.
Sure there is the possibility to handle the conflict manually natively on the client side. But I don’t want to have the logic on the client side. I want to have it on the server side. Is there some buildt-in feature for that? Or do we need to implement that on our own? If yes, I guess the sync function is the right place for that?