This commit is contained in:
2023-08-17 17:32:36 +08:00
parent bbd4d7b353
commit c30c830169
+1 -4
View File
@@ -223,10 +223,7 @@ abstract class Model extends Component implements ModelInterface, ArrayAccess, T
*/
public function getPrimaryValue(): ?int
{
if ($this->hasPrimary()) {
return $this->getAttribute($this->getPrimary());
}
return null;
return $this->_oldAttributes[$this->getPrimary()] ?? null;
}
/**