mirror of
				https://github.com/nsnail/FreeSql.git
				synced 2025-11-04 17:20:49 +08:00 
			
		
		
		
	- 修复 RawJoin 可能生成错误的 SQL;
This commit is contained in:
		@@ -672,9 +672,12 @@ namespace FreeSql.Internal.CommonProvider
 | 
				
			|||||||
            _join.Append(" \r\n").Append(sql);
 | 
					            _join.Append(" \r\n").Append(sql);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            //fsql.Select<User1, UserGroup>().RawJoin("FULL JOIN UserGroup b ON b.id = a.GroupId").ToSql((a, b) => new { user = a, group = b });
 | 
					            //fsql.Select<User1, UserGroup>().RawJoin("FULL JOIN UserGroup b ON b.id = a.GroupId").ToSql((a, b) => new { user = a, group = b });
 | 
				
			||||||
            foreach (var tb in _tables)
 | 
					            for (var a = 1; a < _tables.Count; a++)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                var tb = _tables[a];
 | 
				
			||||||
                if (sql.Contains($" {tb.Table.DbName} ") || sql.Contains($" {_commonUtils.QuoteSqlName(tb.Table.DbName)} "))
 | 
					                if (sql.Contains($" {tb.Table.DbName} ") || sql.Contains($" {_commonUtils.QuoteSqlName(tb.Table.DbName)} "))
 | 
				
			||||||
                    tb.Type = SelectTableInfoType.RawJoin;
 | 
					                    tb.Type = SelectTableInfoType.RawJoin;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
            return this as TSelect;
 | 
					            return this as TSelect;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user