Closed
Description
In order to reproduce, make a collection with documents having integer ids. Then run the following:
\DB::connection('mongodb')->enableQueryLog();
User::query()->chunkById(100, function ($collection) {
dd($collection->count());
});
dd(\DB::connection('mongodb')->getQueryLog());
The expected behavior would be dumping the count of first chunk.
What actually happens is this query getting dumped:
users.find({"_id":{"$gt":"000000000000000000000000"}},{"sort":{"_id":1},"limit":100,"typeMap":{"root":"array","document":"array"}})
Apparently, no integer is less than '000000000000000000000000' in MongoDb.
A Related PR: #1317
ping @DFurnes
Any idea on how to fix this?
Metadata
Metadata
Assignees
Labels
No labels