Skip to content

Commit b3779a1

Browse files
authored
Avoid unnecessary data fetch for exists method (#2692)
1 parent 2adbf87 commit b3779a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Query/Builder.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ public function aggregate($function, $columns = [])
545545
/** @inheritdoc */
546546
public function exists()
547547
{
548-
return $this->first() !== null;
548+
return $this->first(['_id']) !== null;
549549
}
550550

551551
/** @inheritdoc */

0 commit comments

Comments
 (0)