Open m-vdb opened 11 years ago
Happy to take a pull request for this :)
This will remain out-of-scope as long as we support Python < 2.7
I disagree that this is out of scope due to support of < 2.7. It should be possible to utilize the OrderedDict class when it is available and disable support or use an alternate implementation when it isn't. It seems that the DynamicField class already preserves order when inserting data but loses order when extracting that data.
My team and I are migrating an application from pymongo to mongoengine. We have a few documents that require ordered dictionary / subdocument fields. I'll take a look at this problem and submit a pull request if I'm able to solve it.
OK, I'm actually fine with it and even more happy if you come out with a proper solution also compatible with Python 2.6 ! I'll review your PR with pleasure :-)
In previous discussion, this feature was hard to implement because of the compatibility for Python2.6. But from the v0.11.0 release, the support of Python2.6 is dropped. So I implemented this feature.
Thank you.
Is this feature released? I did not see the OrderedDynamicField in mongoengine-0.13.0
Just to clarify, the feature wasn't released (in fact the PR got merged but then the commit got reverted)
Hi,
As PyMongo supports the OrderedDict through SON objects (http://api.mongodb.org/python/current/api/bson/son.html?highlight=bson.son#bson.son.SON), is anyone thinking about the possibility to support this in MongoEngine ?
Cheers,