mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-04-22 02:32:50 +08:00
- 优化 DbSet/Repository 级联保存时,忽略未配置的导航属性;
This commit is contained in:
parent
172b228df8
commit
027f3fcce0
@ -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)
|
||||||
{
|
{
|
||||||
|
@ -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)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user