mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-07-16 07:57:33 +08:00
Update nav
This commit is contained in:
parent
34b23e423f
commit
629a9c8166
@ -10,6 +10,11 @@ namespace SqlSugar
|
|||||||
{
|
{
|
||||||
public NavigateType? _NavigateType { get; set; }
|
public NavigateType? _NavigateType { get; set; }
|
||||||
private void UpdateOneToMany<TChild>(string name, EntityColumnInfo nav) where TChild : class, new()
|
private void UpdateOneToMany<TChild>(string name, EntityColumnInfo nav) where TChild : class, new()
|
||||||
|
{
|
||||||
|
DeleteInsert<TChild>(name, nav);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DeleteInsert<TChild>(string name, EntityColumnInfo nav) where TChild : class, new()
|
||||||
{
|
{
|
||||||
List<TChild> children = new List<TChild>();
|
List<TChild> children = new List<TChild>();
|
||||||
var parentEntity = _ParentEntity;
|
var parentEntity = _ParentEntity;
|
||||||
@ -88,6 +93,7 @@ namespace SqlSugar
|
|||||||
_NavigateType = null;
|
_NavigateType = null;
|
||||||
SetNewParent<TChild>(thisEntity, thisPkColumn);
|
SetNewParent<TChild>(thisEntity, thisPkColumn);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static bool ParentIsPk(EntityColumnInfo parentNavigateProperty)
|
private static bool ParentIsPk(EntityColumnInfo parentNavigateProperty)
|
||||||
{
|
{
|
||||||
return parentNavigateProperty != null &&
|
return parentNavigateProperty != null &&
|
||||||
|
@ -51,6 +51,7 @@ namespace SqlSugar
|
|||||||
public bool OneToManyDeleteAll { get; set; }
|
public bool OneToManyDeleteAll { get; set; }
|
||||||
public bool OneToManyEnableLogicDelete { get; set; }
|
public bool OneToManyEnableLogicDelete { get; set; }
|
||||||
public bool OneToManyNoDeleteNull { get; set; }
|
public bool OneToManyNoDeleteNull { get; set; }
|
||||||
|
public bool OneToManyInsertOrUpdate { get; set; }
|
||||||
public Expression RootFunc { get; set; }
|
public Expression RootFunc { get; set; }
|
||||||
public Expression CurrentFunc { get; set; }
|
public Expression CurrentFunc { get; set; }
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user