8000 fix chunkById for types other than ObjectId and laravel >= 5.6.25 (#1… · mongodb/laravel-mongodb@fdf7f67 · GitHub
[go: up one dir, main page]

Skip to content

Commit fdf7f67

Browse files
halaeijenssegers
authored andcommitted
fix chunkById for types other than ObjectId and laravel >= 5.6.25 (#1543)
1 parent e998cd0 commit fdf7f67

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

src/Jenssegers/Mongodb/Query/Builder.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -633,12 +633,6 @@ public function chunkById($count, callable $callback, $column = '_id', $alias =
633633
*/
634634
public function forPageAfterId($perPage = 15, $lastId = 0, $column = '_id')
635635
{
636-
// When using ObjectIDs to paginate, we need to use a hex string as the
637-
// "minimum" ID rather than the integer zero so the '$lt' query works.
638-
if ($column === '_id' && $lastId === 0) {
639-
$lastId = '000000000000000000000000';
640-
}
641-
642636
return parent::forPageAfterId($perPage, $lastId, $column);
643637
}
644638

0 commit comments

Comments
 (0)
0