// Pipeline updates don't support the `$inc` operator, but you can emulate it: db.foo.updateOne( { _id : 'FOO' }, [ { $set : { _version : { $cond : { if : { $eq : [ { $type : '$_version' }, 'null' ] }, then : 1, else : { $add : [ '$_version', 1 ] }, }, } } } ] );