agirbal / umongo

Desktop app to browse and administer your MongoDB cluster
http://www.edgytech.com/umongo/
580 stars 94 forks source link

When query doc contains two equals clauses, only the second is applied #226

Closed MaggieLeber closed 10 years ago

MaggieLeber commented 10 years ago

For example... {"owner.user":"maggie"} ...does what you would expect. and so does {"owner.user":"mleber"}

But {"owner.user":"maggie", "owner.user" : "mleber"} returns the same result as {"owner.user":"mleber"} ...when it should be empty.

agirbal commented 10 years ago

Hi Maggie, in JSON there should not be duplicated keys. In this case, the java driver parses the keys fine into a hashmap and the last one overwrites the previous key. The only fix to this, would be for the java driver to throw exception if a key is seen duplicated. Feel free to open Java driver ticket issues at http://jira.mongodb.org

MaggieLeber commented 10 years ago

Hmm. Point is well-taken.