Error reported in reverse navigation one to one insert

This commit is contained in:
sunkaixuan
2022-09-03 13:16:35 +08:00
parent 0e7cd00873
commit 7517c14491

View File

@@ -33,7 +33,7 @@ namespace SqlSugar
}
}
if (!IsDefaultValue(navPropertyValue))
if (!IsDefaultValue(navPropertyValue)&& parentColumn.IsPrimarykey==false)
{
this._Context.Updateable<DbTableInfo>
().AS(parentEntity.DbTableName)