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

Fix query get cursor #14

Closed
wants to merge 1 commit into from
Closed

Conversation

ornicar
Copy link
Contributor

@ornicar ornicar commented Sep 21, 2010

Make it possible to call ->getCursor() on a GROUP query.

@hex337
Copy link

hex337 commented Oct 6, 2010

This would be really helpful to fix........

@ornicar
Copy link
Contributor Author

ornicar commented Oct 7, 2010

Jwage is right, it's written in php.net documentation http://fr.php.net/manual/fr/mongocollection.group.php

Group queries return an array, not a cursor.

@jwage
Copy link
Member

jwage commented Oct 18, 2010

I think the real solution here is to make our MongoCursor implementation a little more abstract and allow a lower level wrapper around an array so that we can make the returned data API consistent in Doctrine even when the mongo driver gives us inconsistent results. I will have a fix for this by the end of the week.

@jwage
Copy link
Member

jwage commented Nov 14, 2010

I fixed this so it will return an instance of Doctrine\ODM\MongoDB\MongoIterator but it still will just return an array for group queries because the data that is returned is not always able to be determined. It might just be a single scalar value. We don't really know. So I don't think it makes sense to wrap the result of group queries in an instance of MongoArrayIterator.

jwage added a commit that referenced this pull request Apr 2, 2013
added missing full classname (including namespace)
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants