"_id" and "_rev" added to documents after sync?

I have observed that an “_id” and “_rev” attribute seems to be added to my documents after they have been sync’ed. The “_id” contains the same key as META().id and “_rev” the same info as the meta xattr. sync. rev field.

Like this:

Why do these get added to my docs? Is it due to some misconfig. of my sync?

… I see that some places in the documentation it is mentioned that these fields get added during sync. But do I need to concern myself about them when using e.g. upsert() ??

You should not have to be concerned about that. All mutations made through the server will be imported and processed by the Sync Gateway for sync ).You can read a bit more about it here

2 Likes