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

XMLWordPrintableJSON

    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      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

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

              Created:
              Updated:
              Resolved: