mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-04-22 18:52:50 +08:00
- 修复 嵌套查询DTO映射可能触发循环引用 bug;
This commit is contained in:
parent
0b8f2127f7
commit
65bbee93a2
@ -18,7 +18,7 @@
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>key.snk</AssemblyOriginatorKeyFile>
|
||||
<DelaySign>false</DelaySign>
|
||||
<Version>3.2.807-preview20231214</Version>
|
||||
<Version>3.2.806</Version>
|
||||
<PackageReadmeFile>readme.md</PackageReadmeFile>
|
||||
</PropertyGroup>
|
||||
|
||||
|
@ -2568,6 +2568,7 @@ namespace FreeSql.Internal
|
||||
{
|
||||
if (tb == null || dtoProp == null || tb.Parameter == null) return null;
|
||||
var retList = new List<Expression[]>();
|
||||
var matchIgnores = new Dictionary<PropertyInfo, bool>();
|
||||
var retExp = LocalMatch(tb.Parameter.Type, tb.Parameter);
|
||||
if (retList.Any() == false) retList.Add(new[] { retExp });
|
||||
return retList;
|
||||
@ -2584,6 +2585,8 @@ namespace FreeSql.Internal
|
||||
if (Utils.dicExecuteArrayRowReadClassOrTuple.ContainsKey(typeProp.PropertyType)) continue;
|
||||
if (typeProp.PropertyType.IsAnonymousType() || _common.GetTableByEntity(typeProp.PropertyType)?.Columns.Any() == true)
|
||||
{
|
||||
if (matchIgnores.ContainsKey(typeProp)) continue;
|
||||
matchIgnores.Add(typeProp, true);
|
||||
var nextExp = Expression.MakeMemberAccess(memExp, typeProp);
|
||||
var ret = LocalMatch(typeProp.PropertyType, nextExp);
|
||||
if (ret != null)
|
||||
|
Loading…
x
Reference in New Issue
Block a user