mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-06 23:02:48 +08:00
Controller类增加batchValidate属性 validate方法增加batch参数,用于设置是否批量验证
异常类改进
This commit is contained in:
@@ -1723,7 +1723,11 @@ class Query
|
||||
}
|
||||
}
|
||||
} elseif (!empty($options['fail'])) {
|
||||
throw new DbException('Data not Found', $options, $sql);
|
||||
if(!empty($this->model)){
|
||||
throw new ModelNotFoundException('Data not Found', $this->model, $options);
|
||||
}else{
|
||||
throw new DataNotFoundException('Data not Found', $options['table'], $options);
|
||||
}
|
||||
}
|
||||
return $resultSet;
|
||||
}
|
||||
|
||||
@@ -31,5 +31,13 @@ class DataNotFoundException extends DbException
|
||||
$this->setData('Database Config', $config);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取数据表名
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getTable()
|
||||
{
|
||||
return $this->table;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,11 @@ class ModelNotFoundException extends DbException
|
||||
$this->setData('Database Config', $config);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取模型类名
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getModel()
|
||||
{
|
||||
return $this->model;
|
||||
|
||||
Reference in New Issue
Block a user