Skip to content

Commit 5cc755b

Browse files
author
ethan
committed
findByPk
1 parent b2230a6 commit 5cc755b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Builder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ public function findOne($condition = '', $params = array())
208208
public function findByPk($pk, $primaryKeyField = 'id')
209209
{
210210
static::checkColumnName($primaryKeyField);
211-
$this->where('[[' . $primaryKeyField . ']]=?', [$pk]);
211+
$this->where(array($primaryKeyField => $pk));
212212
$this->limit = 1;
213213
return $this->findOne();
214214
}

0 commit comments

Comments
 (0)