- 修复 父子关系导航属性 Dto 中直接使用 a.Parent 映射错误的 bug;

This commit is contained in:
28810
2020-01-23 15:53:11 +08:00
parent 023956d704
commit 4b2887f607
3 changed files with 10 additions and 34 deletions

View File

@ -1109,7 +1109,8 @@ namespace FreeSql.Internal
var finds = new SelectTableInfo[0];
if (tsc.style == ExpressionStyle.SelectColumns)
{
finds = tsc._tables.Where(a => a.Table.Type == tbtmp.Type).ToArray();
finds = tsc._tables.Where(a => a.Table.Type == tbtmp.Type && a.Alias == alias).ToArray();
if (finds.Length != 1) finds = tsc._tables.Where(a => a.Table.Type == tbtmp.Type).ToArray();
if (finds.Any()) finds = new[] { finds.First() };
}
if (finds.Length != 1 && isa && parmExp != null)