mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 04:18:16 +08:00
- 修复 AsTreeCte 开启自动迁移时,错误的创建了 as_tree_cte 表;#476
This commit is contained in:
@ -451,6 +451,8 @@ public static partial class FreeSqlGlobalExtensions
|
||||
});
|
||||
sql2ctePath = $"{sql2ctePath} as cte_path, ";
|
||||
}
|
||||
if (select._orm.CodeFirst.IsAutoSyncStructure)
|
||||
(select._orm.CodeFirst as CodeFirstProvider)._dicSycedTryAdd(tb.Type, cteName); //#476
|
||||
var sql2 = select
|
||||
.AsAlias((type, old) => type == tb.Type ? old.Replace("wct2", "wct1") : old)
|
||||
.AsTable((type, old) => type == tb.Type ? cteName : old)
|
||||
|
Reference in New Issue
Block a user