heynemann / motorengine

Motorengine is a port of MongoEngine for Tornado.
http://motorengine.readthedocs.org
204 stars 67 forks source link

Id handling and cursors #127

Closed christ0pher closed 6 years ago

christ0pher commented 7 years ago

If the object contains a field called "id", motor engine should not interpret the mongodb field "_id" as a dynamic field. This overrides the "id" field from the object itself in some cases. To be specific if the dictionary of fields from bson converted to a dict contains the objects id field before the "_id" field from mongodb. In that case the mapping is wrong and motor engine overrides the id value from the object with the _id value from mongodb. Also newer versions of motor return a cursor for aggregations.

thekie commented 6 years ago

+1

heynemann commented 6 years ago

Do you still want to get this merged? Do you think you can work to get the build to pass?

heynemann commented 6 years ago

I'll fix the build. Thanks for the contribution!