Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document wrapping is lost on sorting #4

Open
neithere opened this issue Aug 20, 2013 · 0 comments
Open

Document wrapping is lost on sorting #4

neithere opened this issue Aug 20, 2013 · 0 comments

Comments

@neithere
Copy link
Owner

Let's find something in the database:

qs = Foo.find(db, query)

here qs is a monk.modeling.MongoResultSet instance; now sort the documents:

qs2 = qs.sort('foo')

...whoops, qs2 is a pymongo.cursor.Cursor, i.e. monk.modeling.Document wrapping is lost.

Currently MongoResultSet simply redirects __getattr__ to Cursor; it should wrap the results in some cases as it does in __iter__.

Note: This issue has been automatically migrated from Bitbucket
Created by @neithere on 2012-05-17 01:27:32+00:00, last updated: 2012-05-17 01:28:09+00:00

@ghost ghost assigned neithere Aug 20, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant