mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-17 19:43:21 +08:00
- 修复 RawJoin 可能生成错误的 SQL;
This commit is contained in:
parent
d40036dce8
commit
aa56b2bf2f
@ -672,9 +672,12 @@ namespace FreeSql.Internal.CommonProvider
|
||||
_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 });
|
||||
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)} "))
|
||||
tb.Type = SelectTableInfoType.RawJoin;
|
||||
}
|
||||
return this as TSelect;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user