mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-19 01:58:13 +08:00
Update Bug
This commit is contained in:
@@ -210,7 +210,7 @@ namespace SqlSugar
|
||||
{
|
||||
if (SetValues.IsValuable())
|
||||
{
|
||||
var setValue = SetValues.Where(sv => it.IsPrimarykey == false && (it.IsIdentity == false || (IsOffIdentity && it.IsIdentity))).Where(sv => sv.Key == Builder.GetTranslationColumnName(it.DbColumnName));
|
||||
var setValue = SetValues.Where(sv => it.IsPrimarykey == false && (it.IsIdentity == false || (IsOffIdentity && it.IsIdentity))).Where(sv => sv.Key == Builder.GetTranslationColumnName(it.DbColumnName)|| sv.Key==Builder.GetTranslationColumnName(it.PropertyName));
|
||||
if (setValue != null && setValue.Any())
|
||||
{
|
||||
return setValue.First().Value;
|
||||
|
@@ -221,6 +221,9 @@ namespace SqlSugar
|
||||
foreach (var item in this.UpdateBuilder.DbColumnInfoList)
|
||||
{
|
||||
if (this.UpdateBuilder.Parameters == null) this.UpdateBuilder.Parameters = new List<SugarParameter>();
|
||||
if (this.UpdateBuilder.SetValues.Any(it =>this.SqlBuilder.GetNoTranslationColumnName(it.Key) == item.PropertyName)) {
|
||||
continue;
|
||||
}
|
||||
this.UpdateBuilder.Parameters.Add(new SugarParameter(this.SqlBuilder.SqlParameterKeyWord + item.DbColumnName, item.Value, item.PropertyType));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user