eee
This commit is contained in:
+2
-1
@@ -445,7 +445,7 @@ abstract class Model extends Component implements ModelInterface, ArrayAccess, \
|
||||
if (!$this->hasPrimary()) {
|
||||
return $this->refresh()->afterSave($this->_attributes, []);
|
||||
}
|
||||
|
||||
|
||||
$this->_attributes[$this->getPrimary()] = $lastId;
|
||||
|
||||
return $this->refresh()->afterSave($this->_attributes, [$this->getPrimary() => $lastId]);
|
||||
@@ -658,6 +658,7 @@ abstract class Model extends Component implements ModelInterface, ArrayAccess, \
|
||||
public function refresh(): static
|
||||
{
|
||||
$this->_oldAttributes = $this->_attributes;
|
||||
$this->isNewExample = false;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user