mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 20:38:16 +08:00
- 优化 ServerTime 与 IUpdate.Set 指定更新的问题;#1251
This commit is contained in:
@ -6,7 +6,6 @@ using System.Data;
|
||||
using System.Data.Common;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
@ -1017,9 +1016,15 @@ namespace FreeSql.Internal.CommonProvider
|
||||
|
||||
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 (_versionColumn != null)
|
||||
|
Reference in New Issue
Block a user