- 修复 导航属性配置和Aop冲突的 bug;

This commit is contained in:
28810
2019-09-01 11:12:52 +08:00
parent 56cd333f6f
commit de6e99c710
2 changed files with 34 additions and 2 deletions

View File

@ -75,8 +75,7 @@ namespace FreeSql.Internal
var setMethod = trytb.Type.GetMethod($"set_{p.Name}");
var colattr = common.GetEntityColumnAttribute(entity, p);
var tp = common.CodeFirst.GetDbInfo(colattr?.MapType ?? p.PropertyType);
if (tp == null && colattr != null) colattr.IsIgnore = true; //无法匹配的属性,认定是导航属性,且自动过滤
if (tp == null && colattr == null)
if (tp == null && colattr?.IsIgnore != true)
{
if (common.CodeFirst.IsLazyLoading)
{
@ -88,6 +87,7 @@ namespace FreeSql.Internal
propsNavObjs.Add(p);
continue;
}
if (tp == null && colattr != null) colattr.IsIgnore = true; //无法匹配的属性,认定是导航属性,且自动过滤
if (colattr == null)
colattr = new ColumnAttribute
{