Skip to content

can't update with coll = {database(), collection()} #99

@lubberland

Description

@lubberland

version v0.8.3 , mongo version 3.2.1
test code:

{ok, Conn} = mc_worker_api:connect ([{database, <<"admin">>}, {host, "127.0.0.1"}, {port, 9999}])
Collect = {<<"test">>, <<"device">>},
Command = #{<<"123">> => pid_to_list(self())},
mc_worker_api:update(Conn, Collect, {<<"abc">>, <<"abc">>}, #{<<"$set">> => bson:flatten_map(Command)}).

return msg:

{false,#{<<"code">> => 9,
         <<"errmsg">> => <<"wrong type for 'update' field, expected string, found update: { test: \"device\" }">>}}

do i use the wrong way? thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions