{"issue":{"state":"open","pull_request":{"diff_url":"https://github.com/hmarr/mongoengine/pull/320.diff","html_url":"https://github.com/hmarr/mongoengine/pull/320","patch_url":"https://github.com/hmarr/mongoengine/pull/320.patch"},"milestone":null,"user":{"avatar_url":"https://secure.gravatar.com/avatar/561b584a8d309e785ce6dc026d0cabeb?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"561b584a8d309e785ce6dc026d0cabeb","url":"https://api.github.com/users/jpfarias","login":"jpfarias","id":1088009},"labels":[],"assignee":null,"updated_at":"2011-11-15T11:15:19Z","comments":3,"closed_at":null,"url":"https://api.github.com/repos/hmarr/mongoengine/issues/320","body":"Hi!\r\n\r\nI'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.\r\n\r\nI'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.\r\n\r\nHope this helps,\r\n\r\n--\r\nJP","html_url":"https://github.com/hmarr/mongoengine/issues/320","title":"Fixes a bug on connection and make use of depth parameter on dereference","number":320,"id":1928610,"created_at":"2011-10-17T13:51:29Z"},"action":"created","comment":{"user":{"avatar_url":"https://secure.gravatar.com/avatar/630e114bb1f79c0924103b96921227c2?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"630e114bb1f79c0924103b96921227c2","url":"https://api.github.com/users/rozza","login":"rozza","id":420},"updated_at":"2011-11-15T11:15:19Z","url":"https://api.github.com/repos/hmarr/mongoengine/issues/comments/2743517","body":"@jpfarias got a testcase?","id":2743517,"created_at":"2011-11-15T11:15:19Z"}}