From b6289584c50df22385ad47afb47ba22f7326556c Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Fri, 30 Jun 2023 13:35:19 +0800 Subject: [PATCH] Update Multi db AOP --- .../Abstract/QueryableProvider/QueryableHelper.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Src/Asp.NetCore2/SqlSugar/Abstract/QueryableProvider/QueryableHelper.cs b/Src/Asp.NetCore2/SqlSugar/Abstract/QueryableProvider/QueryableHelper.cs index 38673ea12..7470bb536 100644 --- a/Src/Asp.NetCore2/SqlSugar/Abstract/QueryableProvider/QueryableHelper.cs +++ b/Src/Asp.NetCore2/SqlSugar/Abstract/QueryableProvider/QueryableHelper.cs @@ -1402,11 +1402,15 @@ namespace SqlSugar JoinWhere = expResult.GetResultString(), ShortName = lastPareamter.Name, EntityType= lastPareamter.Type, - TableName = this.Context.EntityMaintenance.GetTableName(lastPareamter.Type) + TableName = null }; - if (QueryBuilder.IsCrossQueryWithAttr) + if (QueryBuilder.IsCrossQueryWithAttr) { - result.TableName=GetTableName(this.Context.EntityMaintenance.GetEntityInfo(lastPareamter.Type), result.TableName); + result.TableName = GetTableName(this.Context.EntityMaintenance.GetEntityInfoWithAttr(lastPareamter.Type), result.TableName); + } + else + { + result.TableName= this.Context.EntityMaintenance.GetTableName(lastPareamter.Type); } if (this.Context.CurrentConnectionConfig?.MoreSettings?.PgSqlIsAutoToLower == false) {