mongomock icon indicating copy to clipboard operation
mongomock copied to clipboard

Change insertion order of keys in data dicts maintained in Collection._store

Open YotamAlon opened this issue 3 years ago • 0 comments

Some external libraries (mongoengine is one example), depend on the insertion order of the fields in the dict returned by pymongo, specifically in this fix that the "_id" field is first. I've confirmed that this is how pymongo is providing the data.

Incidentally, this also fixes https://github.com/mongomock/mongomock/issues/641

YotamAlon avatar Jan 28 '23 13:01 YotamAlon