mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 07:12:47 +08:00
改进model类
This commit is contained in:
@@ -1128,7 +1128,9 @@ class Model
|
|||||||
{
|
{
|
||||||
// 获取数据 支持二维数组
|
// 获取数据 支持二维数组
|
||||||
$value = $this->getDataValue($data, $key);
|
$value = $this->getDataValue($data, $key);
|
||||||
|
if (strpos($key, '.')) {
|
||||||
|
list($name1, $name2) = explode('.', $key);
|
||||||
|
}
|
||||||
if ((in_array($key, $options['value_fill']) && '' == $value)
|
if ((in_array($key, $options['value_fill']) && '' == $value)
|
||||||
|| (in_array($key, $options['exists_fill']) && is_null($value))) {
|
|| (in_array($key, $options['exists_fill']) && is_null($value))) {
|
||||||
// 不满足自动填充条件
|
// 不满足自动填充条件
|
||||||
@@ -1166,7 +1168,6 @@ class Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (strpos($key, '.')) {
|
if (strpos($key, '.')) {
|
||||||
list($name1, $name2) = explode('.', $key);
|
|
||||||
$data[$name1][$name2] = $result;
|
$data[$name1][$name2] = $result;
|
||||||
} else {
|
} else {
|
||||||
$data[$key] = $result;
|
$data[$key] = $result;
|
||||||
|
|||||||
Reference in New Issue
Block a user