Browse Source

Update Subquery.EnableTableFilter()

pull/31/head
sunkaixuan 2 years ago
parent
commit
08acec50ef
  1. 2
      Src/Asp.Net/SqlSugar/ExpressionsToSql/Subquery/Items/SubEnableTableFilter.cs

2
Src/Asp.Net/SqlSugar/ExpressionsToSql/Subquery/Items/SubEnableTableFilter.cs

@ -56,7 +56,7 @@ namespace SqlSugar
if (field != null)
{
Type ChildType = item.GetType().GetProperty("type", flag).GetValue(item, null) as Type;
if (ChildType == type|| ChildType.IsInterface)
if (ChildType == type|| (ChildType.IsInterface&&type.GetInterfaces().Contains(ChildType)))
{
var entityInfo = db.EntityMaintenance.GetEntityInfo(ChildType);
var exp = field.GetValue(item, null) as Expression;

Loading…
Cancel
Save