Skip to content

Commit ff31e58

Browse files
committed
PHPLIB-1563: set singleBatch option for findOne
1 parent 4407172 commit ff31e58

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

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

0 commit comments

Comments
 (0)