Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix embedded doc exception with new mongo-cxx #46

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aospan
Copy link

@aospan aospan commented Dec 14, 2018

With modern mongo-cxx (tested on 3.3.1) we have exception while using
embedded documents:

terminate called after throwing an instance of
'bsoncxx::v_noabi::exception'
what(): can't convert builder to a valid view: unmatched key

For example:
{
"name" : "Jenny",
"contact_info" :
{
"type" : "home"
}
}

we have called twice:

  1. for "contact_info" key
  2. for "contact_info.type" key

we can't call key_view/key_owned twice.
Otherwise we receive exception as described above.

Signed-off-by: Abylay Ospan aospan@netup.ru

With modern mongo-cxx (tested on 3.3.1) we have exception while using
embedded documents:

    terminate called after throwing an instance of
    'bsoncxx::v_noabi::exception'
    what(): can't convert builder to a valid view: unmatched key

For example:
{
    "name" : "Jenny",
    "contact_info" :
    {
        "type" : "home"
    }
}

we have called twice:
 1. for "contact_info" key
 2. for "contact_info.type" key

we can't call key_view/key_owned twice.
Otherwise we receive exception as described above.

Signed-off-by: Abylay Ospan <aospan@netup.ru>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant