Skip to content

Commit 48376d0

Browse files
committed
PHPLIB-1563: set singleBatch option for findOne
1 parent 7e41895 commit 48376d0

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
@@ -424,6 +424,10 @@ private function createQueryOptions(): array
424424
$options['batchSize']++;
425425
}
426426

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

0 commit comments

Comments
 (0)