diff --git a/Database/Base/BaseActiveRecord.php b/Database/Base/BaseActiveRecord.php index 5e88044d..4497ec10 100644 --- a/Database/Base/BaseActiveRecord.php +++ b/Database/Base/BaseActiveRecord.php @@ -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 */