Skip to content

Fix regression with cursor counts #1211

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

Merged
merged 1 commit into from
Aug 19, 2015
Merged

Fix regression with cursor counts #1211

merged 1 commit into from
Aug 19, 2015

Conversation

alcaeus
Copy link
Member

@alcaeus alcaeus commented Aug 19, 2015

This fixes a regression introduced in e2f23bc that causes wrong counts to be returned.
The default behavior for count() in a cursor is to return all elements, disregarding any skip/limit set.

->execute();

$this->assertEquals(5, $cursor->count());
$this->assertEquals(2, $cursor->count(2));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

->count(true)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgive me. Haven't had my morning coffee yet. ;)

alcaeus added a commit that referenced this pull request Aug 19, 2015
@alcaeus alcaeus merged commit 705ed45 into doctrine:master Aug 19, 2015
@alcaeus alcaeus deleted the fix-foundonly-behavior branch August 19, 2015 07:57
@jmikola jmikola added this to the 1.0.1 milestone Aug 31, 2015
@jmikola jmikola added the Bug label Aug 31, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants