mirror of
				https://github.com/nsnail/FreeSql.git
				synced 2025-11-04 09:15:27 +08:00 
			
		
		
		
	加个判断,子查询如果使用了相同 ISelect 会死循环
This commit is contained in:
		@@ -633,14 +633,15 @@ namespace FreeSql.Internal
 | 
				
			|||||||
                                        fsqlType.GetField("_limit", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(fsql, 1);
 | 
					                                        fsqlType.GetField("_limit", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(fsql, 1);
 | 
				
			||||||
                                        fsqltables = fsqlType.GetField("_tables", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(fsql) as List<SelectTableInfo>;
 | 
					                                        fsqltables = fsqlType.GetField("_tables", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(fsql) as List<SelectTableInfo>;
 | 
				
			||||||
                                        //fsqltables[0].Alias = $"{tsc._tables[0].Alias}_{fsqltables[0].Alias}";
 | 
					                                        //fsqltables[0].Alias = $"{tsc._tables[0].Alias}_{fsqltables[0].Alias}";
 | 
				
			||||||
                                        fsqltables.AddRange(tsc._tables.Select(a => new SelectTableInfo
 | 
					                                        if (fsqltables != tsc._tables)
 | 
				
			||||||
                                        {
 | 
					                                            fsqltables.AddRange(tsc._tables.Select(a => new SelectTableInfo
 | 
				
			||||||
                                            Alias = a.Alias,
 | 
					                                            {
 | 
				
			||||||
                                            On = "1=1",
 | 
					                                                Alias = a.Alias,
 | 
				
			||||||
                                            Table = a.Table,
 | 
					                                                On = "1=1",
 | 
				
			||||||
                                            Type = SelectTableInfoType.Parent,
 | 
					                                                Table = a.Table,
 | 
				
			||||||
                                            Parameter = a.Parameter
 | 
					                                                Type = SelectTableInfoType.Parent,
 | 
				
			||||||
                                        }));
 | 
					                                                Parameter = a.Parameter
 | 
				
			||||||
 | 
					                                            }));
 | 
				
			||||||
                                    }
 | 
					                                    }
 | 
				
			||||||
                                    else if (fsqlType != null)
 | 
					                                    else if (fsqlType != null)
 | 
				
			||||||
                                    {
 | 
					                                    {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user