From 848d4a8cb489b7aec8ebbfe3a1500117f710c368 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Wed, 2 Nov 2022 11:24:49 +0800 Subject: [PATCH] Update pgsql bug --- .../SqlSugar/Abstract/SugarProvider/SqlSugarAccessory.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Src/Asp.Net/SqlSugar/Abstract/SugarProvider/SqlSugarAccessory.cs b/Src/Asp.Net/SqlSugar/Abstract/SugarProvider/SqlSugarAccessory.cs index b6c887515..1ee26e103 100644 --- a/Src/Asp.Net/SqlSugar/Abstract/SugarProvider/SqlSugarAccessory.cs +++ b/Src/Asp.Net/SqlSugar/Abstract/SugarProvider/SqlSugarAccessory.cs @@ -464,17 +464,22 @@ namespace SqlSugar { joinInfo.TableName = entityType.Name; } + var isNoPgAuto = this.Context.CurrentConnectionConfig.MoreSettings?.PgSqlIsAutoToLower == false; if (isFirst) { var firstItem = lambdaParameters.First(); lambdaParameters.Remove(firstItem); shortName = firstItem.Name; + if (isNoPgAuto) + shortName = sqlBuilder.GetTranslationColumnName(shortName); } var joinString = joinArray[i * 2 - 2]; joinInfo.ShortName = lambdaParameters[i - 1].Name; joinInfo.JoinType = (JoinType)Enum.Parse(typeof(JoinType), joinString); joinInfo.JoinWhere = joinArray[i * 2 - 1]; joinInfo.JoinIndex = i; + if (isNoPgAuto) + joinInfo.ShortName = sqlBuilder.GetTranslationColumnName(joinInfo.ShortName); result.Add((joinInfo)); } expressionContext.Clear();