public function restoreConditions()
{
if (!$this->model) {
// adding new model
if ($this->table_alias) {
$this->model = $this->add($this->model_name, array('table_alias' => $this->table_alias));
} else {
$this->model = $this->add($this->model_name);
}
$this->saveConditions();
}
/** @type SQL_Model $this->model */
$this->model->_dsql()->args['where'] = $this->orig_conditions;
return $this;
}