diff --git a/src/Drivers/EloquentEntitySet.php b/src/Drivers/EloquentEntitySet.php index de3dbb063..58cabccdb 100644 --- a/src/Drivers/EloquentEntitySet.php +++ b/src/Drivers/EloquentEntitySet.php @@ -300,7 +300,7 @@ public function query(): Generator $builder->skip($this->getSkip()->getValue()); } - foreach ($builder->lazyById() as $model) { + foreach ($builder->cursor() as $model) { yield $this->modelToEntity($model); } }