Update subInsert

This commit is contained in:
sunkaixuna 2021-08-17 00:07:14 +08:00
parent e745aede4f
commit 25bc0d4d9f

View File

@ -125,6 +125,7 @@ namespace SqlSugar
if (isIdEntity)
{
id = this.Context.Insertable(InsertObject).ExecuteReturnIdentity();
this.Entity.Columns.First(it => it.IsIdentity || it.OracleSequenceName.HasValue()).PropertyInfo.SetValue(InsertObject, id);
}
var pk = GetPrimaryKey(this.Entity, InsertObject, id);
AddChildList(this.SubList, InsertObject, pk);