mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-18 20:08:15 +08:00
- 优化 ServerTime 与 IUpdate.Set 指定更新的问题;#1251
This commit is contained in:
@ -193,9 +193,15 @@ namespace FreeSql.ClickHouse.Curd
|
||||
|
||||
if (_source.Any() == false)
|
||||
{
|
||||
var sbString = "";
|
||||
foreach (var col in _table.Columns.Values)
|
||||
if (col.Attribute.CanUpdate && string.IsNullOrEmpty(col.DbUpdateValue) == false)
|
||||
sb.Append(", ").Append(_commonUtils.QuoteSqlName(col.Attribute.Name)).Append(" = ").Append(col.DbUpdateValue);
|
||||
{
|
||||
if (sbString == "") sbString = sb.ToString();
|
||||
var loc3 = _commonUtils.QuoteSqlName(col.Attribute.Name);
|
||||
if (sbString.Contains(loc3)) continue;
|
||||
sb.Append(", ").Append(loc3).Append(" = ").Append(col.DbUpdateValue);
|
||||
}
|
||||
}
|
||||
|
||||
if (_table.VersionColumn != null)
|
||||
|
Reference in New Issue
Block a user