mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 20:52:48 +08:00
修正当使用table方法的时候 getPk方法的BUG
This commit is contained in:
@@ -1102,7 +1102,8 @@ class Model
|
||||
public function getPk()
|
||||
{
|
||||
if (is_null($this->pk)) {
|
||||
$this->pk = $this->getTableInfo('', 'pk');
|
||||
$tableName = isset($this->options['table']) ? $this->options['table'] : $this->getTableName();
|
||||
$this->pk = $this->getTableInfo($tableName, 'pk');
|
||||
}
|
||||
return $this->pk;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user