- 优化 DbSet/Repository 级联保存时,忽略未配置的导航属性;

This commit is contained in:
2881099 2021-01-15 18:59:53 +08:00
parent 172b228df8
commit 027f3fcce0
2 changed files with 2 additions and 2 deletions

View File

@ -205,7 +205,7 @@ namespace FreeSql
if (_table.ColumnsByCsIgnore.ContainsKey(prop.Name)) return; if (_table.ColumnsByCsIgnore.ContainsKey(prop.Name)) return;
if (_table.ColumnsByCs.ContainsKey(prop.Name)) return; if (_table.ColumnsByCs.ContainsKey(prop.Name)) return;
var tref = _table.GetTableRef(prop.Name, true); var tref = _table.GetTableRef(prop.Name, false); //防止非正常的导航属性报错
if (tref == null) return; if (tref == null) return;
switch (tref.RefType) switch (tref.RefType)
{ {

View File

@ -217,7 +217,7 @@ namespace FreeSql
if (_table.ColumnsByCsIgnore.ContainsKey(prop.Name)) return; if (_table.ColumnsByCsIgnore.ContainsKey(prop.Name)) return;
if (_table.ColumnsByCs.ContainsKey(prop.Name)) return; if (_table.ColumnsByCs.ContainsKey(prop.Name)) return;
var tref = _table.GetTableRef(prop.Name, true); var tref = _table.GetTableRef(prop.Name, false); //防止非正常的导航属性报错
if (tref == null) return; if (tref == null) return;
switch (tref.RefType) switch (tref.RefType)
{ {