mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-22 12:09:29 +08:00
Update: db.UpdateNav
This commit is contained in:
@@ -86,6 +86,16 @@ namespace SqlSugar
|
||||
com(updateable);
|
||||
updateable.ExecuteCommand();
|
||||
}
|
||||
else if (pkColumn.IsPrimarykey == false)
|
||||
{
|
||||
var pk= this._Context.EntityMaintenance.GetEntityInfo<TChild>().Columns.Where(it => it.IsPrimarykey);
|
||||
List<string> ignoreColumns = new List<string>();
|
||||
if (pk.Any())
|
||||
{
|
||||
ignoreColumns.AddRange(pk.Select(it=>it.PropertyName));
|
||||
}
|
||||
x.AsUpdateable.IgnoreColumns(ignoreColumns.ToArray()).ExecuteCommand();
|
||||
}
|
||||
else
|
||||
{
|
||||
x.AsUpdateable.ExecuteCommand();
|
||||
|
Reference in New Issue
Block a user