allancaffee/scaly-mongo — Issue #5: Cursor.sort() should return a scalymongo.cursor.Cursor
Author: bdeeney
Created: 2011-12-23 15:09:19+00:00
State: open

>>> themes = MongoProxy().models.Theme
>>> themes.find(sort=[('_id', 1)]) # returns a scalymongo.cursor.Cursor

>>> set([type(x) for x in themes.find(sort=[('_id', 1)])]) # returns scalymongo Documents
set([])
>>> themes.find().sort([('_id', 1)]) # returns a pymongo.cursor.Cursor

>>> set([type(x) for x in themes.find().sort([('_id', 1)])]) # returns dicts
set([])
>>>