I use the N1QL UPSERT to update my Docs in the Couchbase. Here is the issue i am running into, i keep a history object under my Documents. So if i create a document its simple as there is no prior history, but if I do an update i don’t want to completely overwrite the history which would mean i lose the created info.
For now i go and get the old history object and then add the updated info to it before i update the doc via set and upsert.
So i am wondering if there is a more effective way short of setting every key and value vs setting whole doc.