From fd6a3c836240c5b97c83f7dde22155979a6ebd0f Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Sat, 3 Jun 2023 14:53:13 +0800 Subject: [PATCH] Update exp to sql --- .../SqlSugar/ExpressionsToSql/Subquery/Items/SubGroupBy.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Src/Asp.Net/SqlSugar/ExpressionsToSql/Subquery/Items/SubGroupBy.cs b/Src/Asp.Net/SqlSugar/ExpressionsToSql/Subquery/Items/SubGroupBy.cs index b130d17db..a7a9113e9 100644 --- a/Src/Asp.Net/SqlSugar/ExpressionsToSql/Subquery/Items/SubGroupBy.cs +++ b/Src/Asp.Net/SqlSugar/ExpressionsToSql/Subquery/Items/SubGroupBy.cs @@ -69,6 +69,10 @@ namespace SqlSugar var selfParameterName = this.Context.GetTranslationColumnName((argExp as LambdaExpression).Parameters.First().Name) + UtilConstants.Dot; if (this.Context.JoinIndex == 0) result = result.Replace(selfParameterName, SubTools.GetSubReplace(this.Context)); + if (this.Context.CurrentShortName == null) + { + this.Context.CurrentShortName =this.Context.GetTranslationColumnName(ExpressionTool.GetParameters(exp).FirstOrDefault().Name); + } return result; } }