Skip to content

Commit dc0650e

Browse files
committed
PHPLIB-1563: set singleBatch option for findOne
1 parent caf7918 commit dc0650e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Operation/Find.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,10 @@ private function createQueryOptions(): array
423423
$options['batchSize']++;
424424
}
425425

426+
if (isset($options['limit']) && $options['limit'] === 1) {
427+
$options['singleBatch'] = true;
428+
}
429+
426430
return $options;
427431
}
428432
}

0 commit comments

Comments
 (0)