Update Nav Update One To Many

This commit is contained in:
sunkaixuan 2023-09-08 16:38:33 +08:00
parent f2e245b3c1
commit 0e383c24f3
2 changed files with 5 additions and 0 deletions

View File

@ -42,6 +42,10 @@ namespace SqlSugar
children.AddRange(childs);
}
ids.Add(parentValue);
if (_Options?.OneToManyNoDeleteNull == true && childs == null)
{
ids.Remove(parentValue);
}
}
if (NotAny(name))
{

View File

@ -49,6 +49,7 @@ namespace SqlSugar
public bool ManyToManyEnableLogicDelete { get; set; }
public bool OneToManyDeleteAll { get; set; }
public bool OneToManyEnableLogicDelete { get; set; }
public bool OneToManyNoDeleteNull { get; set; }
public Expression RootFunc { get; set; }
public Expression CurrentFunc { get; set; }
}