Skip to content

Commit

Permalink
$myModel->find(string "value-of-my-primary-key") #1188
Browse files Browse the repository at this point in the history
adding string as allowed primary key; in current state if you pass string to find method you will get all records instead of desired one.
  • Loading branch information
nowackipawel authored Aug 30, 2018
1 parent 85588b1 commit 6e1335b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion system/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ public function find($id = null)
->get();
$row = $row->getResult($this->tempReturnType);
}
elseif (is_numeric($id))
elseif (is_numeric($id) || is_string($id))
{
$row = $builder->where($this->table.'.'.$this->primaryKey, $id)
->get();
Expand Down

0 comments on commit 6e1335b

Please sign in to comment.