EasyJoin As Bug

This commit is contained in:
sunkaixuna
2021-07-29 19:47:24 +08:00
parent 3a325573ff
commit f8304261a6
2 changed files with 8 additions and 1 deletions

View File

@@ -146,7 +146,10 @@ namespace OrmTest
.ToList();
var sql12 = Db.Queryable<Order, OrderItem, Custom>((o, i, c) => true)
.AS("[aa]")
.AS<OrderItem>("[xx]")
.AS<Custom>("[yy]").ToSql();
_db.QueryFilter.Clear();

View File

@@ -648,6 +648,10 @@ namespace SqlSugar
private string GetTableName(string entityName)
{
if (this.AsTables != null && this.AsTables.Any(it=>it.Key==entityName))
{
entityName = this.AsTables.First(it => it.Key == entityName).Value;
}
var result = this.Context.EntityMaintenance.GetTableName(entityName);
return this.Builder.GetTranslationTableName(result);
}