hmarr/mongoengine — pull request #320 by jpfarias (2011-10-17 13:51:29+00:00)
Title: Fixes a bug on connection and make use of depth parameter on dereference

Hi!

I've found a bug on connection.py that would replace previews open connections with new connections when reconnect is True. It basically calls disconnect() on the old connection if it exists.

I've also changed dereference.py to make use of the depth parameter to avoid loading a large number of objects when they are not needed. Also changed the tests to match the new query counters as there will be more queries now as loading objects deeper into the tree are needed.

Hope this helps,

--
JP