This commit is contained in:
2021-02-23 19:13:13 +08:00
parent cbe9cc0c11
commit 5fd07c2327
+11 -2
View File
@@ -89,16 +89,25 @@ abstract class BaseActiveRecord extends Component implements IOrm, ArrayAccess
/**
* object init
* @throws ComponentException
*/
public function clean()
{
$this->error(get_called_class() . ' clean after request.');
$this->_attributes = [];
$this->_oldAttributes = [];
}
/**
*
* @throws ComponentException
*/
public function __clone()
{
$this->error('__clone ' . get_called_class());
$this->clean();
}
/**
* @throws Exception
*/