Just for the record I had a similar problem (MongoDB 2.2.4 [I cannot 
upgrade] vs Mango 0.24).

This works:

my $cursor = $self->mango->db->collection('files')->find($find);
my $hits = $cursor->count;
$cursor
 ->sort({$sortfield => $sortvalue})
 ->fields($fields)
 ->skip($from)
 ->limit($limit) 
 ->all(
 sub {
    my ($cursor, $error, $coll) = @_;
                            ...
 }
 );

But if I would call ->count after applying eg sort it will say 0 (blocking 
or non-blocking, before or after ->all, it just stopped working).

On Thursday, January 30, 2014 10:06:19 PM UTC+1, sri wrote:
>
> This doesn't work with Mongdb 2.0.2 on Precise. Had to upgrade to latest 
>> MongoDB. Thank you!
>>
>
> As the documentation says, Mango only supports the latest stable release 
> of MongoDB, this is currently 2.4 and will soon be 2.6.
>
> --
> sebastian 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Reply via email to