Skip to content

Commit

Permalink
PHPLIB-1563: set singleBatch option for findOne
Browse files Browse the repository at this point in the history
  • Loading branch information
alcaeus committed Nov 19, 2024
1 parent 7e41895 commit 48376d0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Operation/Find.php
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,10 @@ private function createQueryOptions(): array
$options['batchSize']++;
}

if (isset($options['limit']) && $options['limit'] === 1) {
$options['singleBatch'] = true;
}

return $options;
}
}

0 comments on commit 48376d0

Please sign in to comment.