We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dfaa867 commit 8bfdaabCopy full SHA for 8bfdaab
src/QueryBuilder.php
@@ -206,7 +206,7 @@ public function select($fields): self
206
}
207
208
// Exclude built in _id if not set in fields - MongoDB always returns this by default
209
- if (!in_array("_id", $fields)) {
+ if (!array_key_exists("_id", $this->fields)) {
210
$this->fields["_id"] = 0;
211
212
0 commit comments