改名
This commit is contained in:
@@ -190,10 +190,9 @@ abstract class BaseActiveRecord extends Component implements IOrm, ArrayAccess
|
||||
/**
|
||||
* @throws Exception
|
||||
*/
|
||||
public function hasAutoIncrement(): bool
|
||||
public function isAutoIncrement(): bool
|
||||
{
|
||||
$autoIncrement = $this->getAutoIncrement();
|
||||
return $autoIncrement !== null;
|
||||
return $this->getAutoIncrement() !== null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -434,7 +433,7 @@ abstract class BaseActiveRecord extends Component implements IOrm, ArrayAccess
|
||||
*/
|
||||
private function setPrimary($lastId, $param): static
|
||||
{
|
||||
if ($this->hasAutoIncrement()) {
|
||||
if ($this->isAutoIncrement()) {
|
||||
$this->setAttribute($this->getAutoIncrement(), (int)$lastId);
|
||||
return $this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user