diff --git a/Src/Asp.NetCore2/SqlSugar/Realization/Kdbndp/SqlBuilder/KdbndpExpressionContext.cs b/Src/Asp.NetCore2/SqlSugar/Realization/Kdbndp/SqlBuilder/KdbndpExpressionContext.cs index ae55f7263..8425f3796 100644 --- a/Src/Asp.NetCore2/SqlSugar/Realization/Kdbndp/SqlBuilder/KdbndpExpressionContext.cs +++ b/Src/Asp.NetCore2/SqlSugar/Realization/Kdbndp/SqlBuilder/KdbndpExpressionContext.cs @@ -47,6 +47,14 @@ namespace SqlSugar else if (isMapping) { var mappingInfo = this.MappingTables.FirstOrDefault(it => it.EntityName.Equals(entityName, StringComparison.CurrentCultureIgnoreCase)); + + var tableName = mappingInfo?.DbTableName + ""; + if (tableName.Contains(".")) + { + tableName = string.Join(UtilConstants.Dot, tableName.Split(UtilConstants.DotChar).Select(it => GetTranslationText(it))); + return tableName; + } + return SqlTranslationLeft + (mappingInfo == null ? entityName : mappingInfo.DbTableName).ToUpper(IsUpper) + SqlTranslationRight; } else if (isComplex)