Closed
Description
Hi everyone,
I'm (really) new with Github and I recently found an issue when using a count() when there is a select statement in the query. I'm using the latest stable versions of Laravel 4.1 and this one.
If you try something like:
User::where('_id', '<>', 12)->count();
it will return the correct response whatever is in your database.. but if you try:
User::select( array('_id') )->where('_id', '<>', 12)->count();
I've got an error in: Mongodb/Query/Builder.php
on line 167
If I replace:
return $results['result'];
with:
return $group[$key];
I have the correct result, but this "fix" doesn't look clean at all to me.
Is someone able to reproduce it? And thanks for the project, it's really great!
Metadata
Metadata
Assignees
Labels
No labels