MongoEngine/mongoengine — pull request #576 by cybertoast (2014-02-17 17:32:23+00:00)
Title: Querying GenericReferenceField with mongo doc is broken

A full explanation of the problem is in #560. The problem was introduced in 0.8.5 and this fix just reverts the use of SON() in the query to dict(), which was the implementation in 0.8.4.
Note that 0.8.5+ break implementations of GenericReferenceField-based queries in <=0.8.4.