From b8ffa5e852448c3951edaad465bb6efa9b292bde Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Fri, 22 Apr 2022 21:00:01 +0800 Subject: [PATCH] Update exp to sql --- .../ExpressionsToSql/ResolveItems/BaseResolve.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Src/Asp.Net/SqlSugar/ExpressionsToSql/ResolveItems/BaseResolve.cs b/Src/Asp.Net/SqlSugar/ExpressionsToSql/ResolveItems/BaseResolve.cs index bd951710a..fbfa7c591 100644 --- a/Src/Asp.Net/SqlSugar/ExpressionsToSql/ResolveItems/BaseResolve.cs +++ b/Src/Asp.Net/SqlSugar/ExpressionsToSql/ResolveItems/BaseResolve.cs @@ -612,7 +612,14 @@ namespace SqlSugar { first = first.Split('(').Last().Trim(); } - result.Add(first,last); + if (!result.ContainsKey(first)) + { + result.Add(first, last); + } + else + { + Check.ExceptionEasy("Expression parsing error. Same Key exists at multiple levels", "表达式解析出错,多层级存在相同的Key "); + } } return result; ; }