diff --git a/Src/Asp.Net/SqlSugar/Abstract/ExecuteNavProvider/UpdateNavOneToMany.cs b/Src/Asp.Net/SqlSugar/Abstract/ExecuteNavProvider/UpdateNavOneToMany.cs index ae8d4b341..448bd0c0d 100644 --- a/Src/Asp.Net/SqlSugar/Abstract/ExecuteNavProvider/UpdateNavOneToMany.cs +++ b/Src/Asp.Net/SqlSugar/Abstract/ExecuteNavProvider/UpdateNavOneToMany.cs @@ -170,9 +170,19 @@ namespace SqlSugar } else { - this._Context.Deleteable() - .AS(thisEntity.DbTableName) - .In(thisFkColumn.DbColumnName, ids.Distinct().ToList()).ExecuteCommand(); + if (this._Context?.CurrentConnectionConfig?.MoreSettings?.IsAutoDeleteQueryFilter == true) + { + this._Context.Deleteable() + .AS(thisEntity.DbTableName) + .EnableQueryFilter(thisEntity.Type) + .In(thisFkColumn.DbColumnName, ids.Distinct().ToList()).ExecuteCommand(); + } + else + { + this._Context.Deleteable() + .AS(thisEntity.DbTableName) + .In(thisFkColumn.DbColumnName, ids.Distinct().ToList()).ExecuteCommand(); + } } _NavigateType = NavigateType.OneToMany; InsertDatas(children, thisPkColumn); diff --git a/Src/Asp.NetCore2/SqlSugar/SqlSugarForCore.nuspec b/Src/Asp.NetCore2/SqlSugar/SqlSugarForCore.nuspec index c58c39166..e599ecf69 100644 --- a/Src/Asp.NetCore2/SqlSugar/SqlSugarForCore.nuspec +++ b/Src/Asp.NetCore2/SqlSugar/SqlSugarForCore.nuspec @@ -2,7 +2,7 @@ SqlSugarCore - 5.1.4.125 + 5.1.4.127-preview13 sunkaixuan 果糖大数据科技 http://www.apache.org/licenses/LICENSE-2.0.html