Subdoc on non existing document?

Hi, @brett19

I need to mutate some doc fields but this doc may not exists yet. For now I am using basic scenario:

  1. mutate fields (if doc exists then everything ok)
  2. if mutate failed then insert new doc with those fields

Hoped that there is a better way to do it in 1 round trip…

ps:
here Sub-doc API - upsert auto-create document? some mention of make_doc flag but I could not find it in nodejs docs or sources :slight_smile: