SubInsert ChildList.Count==0 bug

This commit is contained in:
SUNKAIXUAN
2021-03-25 15:57:59 +08:00
parent a01e35ffb4
commit aa86042904

View File

@@ -166,6 +166,10 @@ namespace SqlSugar
child.GetType().GetProperty(subMemberName).SetValue(child, pkValue);
}
}
if (!(childList as IEnumerable<object>).Any())
{
continue;
}
var type = (childList as IEnumerable<object>).First().GetType();
this.Context.InitMappingInfo(type);
var entityInfo = this.Context.EntityMaintenance.GetEntityInfo(type);