anchor.diff:  do_update_server(#state{topology = Topology}, Rec) ->
       Map = to_map(server, Rec),
       Callback = fun(Worker) ->
  -                       Key = #{<<"id">> => Rec#server.id},
  -                       Command = #{<<"$set">> => maps:remove(<<"id">>, Map)},
  +                       Key = #{<<"_id">> => id_to_objectid(Rec#server.id)},
  +                       Command = #{<<"$set">> => maps:remove(<<"_id">>, Map)},
                          mc_worker_api:update(Worker, ?COLLECTION_SERVERS, Key, Command)
                  end,
       Res = mongoc:transaction(Topology, Callback),
  
positive.code:      };
  to_map(permission, Rec) ->
      #{
         <<"id">> => Rec#permission.id,
         <<"userId">> => Rec#permission.userId,
         <<"deviceId">> => Rec#permission.deviceId
       };
  to_map(user, Rec) ->
      #{
         <<"id">> => Rec#user.id,
         <<"name">> => Rec#user.name,
         <<"email">> => Rec#user.email,
         <<"readonly">> => Rec#user.readonly,
  
negative.code:     mongoc:transaction(Topology, fun(Worker) -> mc_worker_api:count(Worker, ?COLLECTION_USERS, #{}) end).
  
  do_create_user(#state{topology = Topology}, Rec) ->
      Map = to_map(user, Rec#user{id = gen_id(), hashPassword = hash(Rec#user.password)}),
      Callback = fun(Worker) ->
                         mc_worker_api:insert(Worker, ?COLLECTION_USERS, Map)
                 end,
  