mirror of
				https://github.com/nsnail/FreeSql.git
				synced 2025-11-04 17:20:49 +08:00 
			
		
		
		
	- 修复 IncludeMany 第3层无法加载的问题,IncludeMany(a => a.Parent.Parent.Childs);
This commit is contained in:
		@@ -372,7 +372,7 @@ namespace FreeSql.Internal.CommonProvider
 | 
				
			|||||||
        {
 | 
					        {
 | 
				
			||||||
            Expression tmpExp = exp;
 | 
					            Expression tmpExp = exp;
 | 
				
			||||||
            ParameterExpression param = null;
 | 
					            ParameterExpression param = null;
 | 
				
			||||||
            var members = new List<MemberExpression>();
 | 
					            var members = new Stack<MemberExpression>();
 | 
				
			||||||
            var isbreak = false;
 | 
					            var isbreak = false;
 | 
				
			||||||
            while (isbreak == false)
 | 
					            while (isbreak == false)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
@@ -381,7 +381,7 @@ namespace FreeSql.Internal.CommonProvider
 | 
				
			|||||||
                    case ExpressionType.MemberAccess:
 | 
					                    case ExpressionType.MemberAccess:
 | 
				
			||||||
                        var memExp = tmpExp as MemberExpression;
 | 
					                        var memExp = tmpExp as MemberExpression;
 | 
				
			||||||
                        tmpExp = memExp.Expression;
 | 
					                        tmpExp = memExp.Expression;
 | 
				
			||||||
                        members.Add(memExp);
 | 
					                        members.Push(memExp);
 | 
				
			||||||
                        continue;
 | 
					                        continue;
 | 
				
			||||||
                    case ExpressionType.Parameter:
 | 
					                    case ExpressionType.Parameter:
 | 
				
			||||||
                        param = tmpExp as ParameterExpression;
 | 
					                        param = tmpExp as ParameterExpression;
 | 
				
			||||||
@@ -392,7 +392,7 @@ namespace FreeSql.Internal.CommonProvider
 | 
				
			|||||||
                }
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            if (param == null) throw new Exception($"表达式错误,它的顶级对象不是 ParameterExpression:{exp}");
 | 
					            if (param == null) throw new Exception($"表达式错误,它的顶级对象不是 ParameterExpression:{exp}");
 | 
				
			||||||
            return NaviteTuple.Create(param, members);
 | 
					            return NaviteTuple.Create(param, members.ToList());
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        static MethodInfo GetEntityValueWithPropertyNameMethod = typeof(EntityUtilExtensions).GetMethod("GetEntityValueWithPropertyName");
 | 
					        static MethodInfo GetEntityValueWithPropertyNameMethod = typeof(EntityUtilExtensions).GetMethod("GetEntityValueWithPropertyName");
 | 
				
			||||||
        static ConcurrentDictionary<Type, ConcurrentDictionary<string, MethodInfo>> _dicTypeMethod = new ConcurrentDictionary<Type, ConcurrentDictionary<string, MethodInfo>>();
 | 
					        static ConcurrentDictionary<Type, ConcurrentDictionary<string, MethodInfo>> _dicTypeMethod = new ConcurrentDictionary<Type, ConcurrentDictionary<string, MethodInfo>>();
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user