model类的setField方法忽略数据副本

This commit is contained in:
thinkphp
2016-02-21 11:37:28 +08:00
parent b7632a5a52
commit e16cb705ba
2 changed files with 5 additions and 5 deletions

View File

@@ -680,6 +680,8 @@ class Model
} else {
$data[$field] = $value;
}
// 更新某个字段的时候 忽略数据副本
$this->duplicate = [];
return $this->save($data);
}
@@ -709,7 +711,6 @@ class Model
$step = '-' . $step;
}
}
$this->duplicate = [];
return $this->setField($field, ['exp', $field . '+' . $step]);
}
@@ -739,7 +740,6 @@ class Model
$step = '-' . $step;
}
}
$this->duplicate = [];
return $this->setField($field, ['exp', $field . '-' . $step]);
}