改名
This commit is contained in:
@@ -424,11 +424,12 @@ abstract class BaseActiveRecord extends Component implements IOrm, ArrayAccess
|
|||||||
if ($this->hasAutoIncrement()) {
|
if ($this->hasAutoIncrement()) {
|
||||||
return $this->setAttribute($this->getAutoIncrement(), (int)$lastId);
|
return $this->setAttribute($this->getAutoIncrement(), (int)$lastId);
|
||||||
}
|
}
|
||||||
if ($this->hasPrimary()) {
|
if (!$this->hasPrimary()) {
|
||||||
$primary = $this->getPrimary();
|
return $this;
|
||||||
if (!isset($param[$primary]) || empty($param[$primary])) {
|
}
|
||||||
$this->setAttribute($primary, (int)$lastId);
|
$primary = $this->getPrimary();
|
||||||
}
|
if (!isset($param[$primary]) || empty($param[$primary])) {
|
||||||
|
$this->setAttribute($primary, (int)$lastId);
|
||||||
}
|
}
|
||||||
return $this->setAttributes($param);
|
return $this->setAttributes($param);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user