mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-05 22:52:49 +08:00
Connection类getAttribute方法 改成 getConfig 增加setConfig方法 Model类类型转换支持格式定义
This commit is contained in:
@@ -89,7 +89,7 @@ abstract class Builder
|
||||
$result = [];
|
||||
foreach ($data as $key => $val) {
|
||||
if (!in_array($key, $fields, true)) {
|
||||
if ($this->connection->getAttribute('fields_strict')) {
|
||||
if ($this->connection->getConfig('fields_strict')) {
|
||||
throw new Exception(' fields not exists :[' . $key . ']');
|
||||
}
|
||||
} else {
|
||||
@@ -106,7 +106,6 @@ abstract class Builder
|
||||
$this->query->bind($key, $val, isset($bind[$key]) ? $bind[$key] : PDO::PARAM_STR);
|
||||
$result[$item] = ':' . $key;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -573,7 +572,7 @@ abstract class Builder
|
||||
foreach ($dataSet as &$data) {
|
||||
foreach ($data as $key => $val) {
|
||||
if (!in_array($key, $fields, true)) {
|
||||
if ($this->connection->getAttribute('fields_strict')) {
|
||||
if ($this->connection->getConfig('fields_strict')) {
|
||||
throw new Exception(' fields not exists :[' . $key . ']');
|
||||
}
|
||||
unset($data[$key]);
|
||||
|
||||
Reference in New Issue
Block a user