Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-7601

Can create document with multiple instances of one key and console doesn't understand it

    XMLWordPrintableJSON

Details

    • ALL

    Description

      I create document via emongo driver:

      emongo:insert(database, "my_collection", [

      {x,4}

      ,

      {x,1}

      ,

      {x,3}

      ]).

      Now I select it:

      emongo:find_all(database, "my_collection").

      [[{<<"_id">>,
      {oid,<<80,156,252,176,8,197,245,106,230,82,14,180>>}},

      {<<"x">>,4}

      ,

      {<<"x">>,1}

      ,

      {<<"x">>,3}

      ]]

      Now I go to console:

      mongo database
      > > db.t.find()

      { "_id" : ObjectId("509cfcb008c5f56ae6520eb4"), "x" : 4, "x" : 4, "x" : 4 }

      I see here two problems:
      1) I can store document with many instances of key and search is done only via first instance of key
      2) mongo console doesn't understand it and looses other values for this key

      Attachments

        Activity

          People

            hari.khalsa@10gen.com hari.khalsa@10gen.com
            maxlapshin Max Lapshin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: