-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Environment:Ubuntu 13.10/x86_64
I insert a dictionary of values in a mongo document. The order in which I insert them in a BsonDocument (from the C# driver) is preserved in the database, however, while consuming the document, Python dictionaries do not preserve the order of the keys, as it preserves them in alphabetical or numeric order by default.
This forces me to sort things after I queried (which forces me to make assumptions about which items are on that dictionary), making my app a little less dynamic.
I suggest that on Mongo responses, Mongo should have a dictionary subclass or a dictionary like class that preserves the order of the keys while retrieving a dictionary from a document.
- is duplicated by
-
PYTHON-1519 Explain does not necessarily retain sortPattern ordering
- Closed