diff --git a/Src/Asp.NetCore2/SqlSugar/ExpressionsToSql/Subquery/SubResolve.cs b/Src/Asp.NetCore2/SqlSugar/ExpressionsToSql/Subquery/SubResolve.cs index 58e2cdccb..db6b36082 100644 --- a/Src/Asp.NetCore2/SqlSugar/ExpressionsToSql/Subquery/SubResolve.cs +++ b/Src/Asp.NetCore2/SqlSugar/ExpressionsToSql/Subquery/SubResolve.cs @@ -186,6 +186,10 @@ namespace SqlSugar { var asName = this.context.GetTranslationTableName(asItems.First().Replace(subKey, ""), false); var repKey = $"\\{this.context.SqlTranslationLeft}.+\\{this.context.SqlTranslationRight}"; + if (this.context.CurrentShortName.HasValue()) + { + asName = asName + " " + this.context.CurrentShortName; + } sqlItems[i] = Regex.Replace(sqlItems[i], repKey, asName); } }