Skip to content

Commit 3238ec3

Browse files
committed
Merge pull request mongodb#1392 from DMNSteve/1354
fix: find() now uses getKeyName() for primary key
2 parents a9e6618 + c9813c6 commit 3238ec3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Jenssegers/Mongodb/Query/Builder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ public function hint($index)
198198
*/
199199
public function find($id, $columns = [])
200200
{
201-
return $this->where('_id', '=', $this->convertKey($id))->first($columns);
201+
return $this->where($this->getKeyName(), '=', $this->convertKey($id))->first($columns);
202202
}
203203

204204
/**

0 commit comments

Comments
 (0)