Update Join.OrderByPropertyName

This commit is contained in:
sunkaixuan
2023-08-02 14:37:10 +08:00
parent 86763f5d5b
commit dbcf7f6a52
6 changed files with 95 additions and 0 deletions

View File

@@ -1088,6 +1088,11 @@ namespace SqlSugar
}
return this;
}
if (this.QueryBuilder.IsSingle() == false && orderPropertyName.Contains("."))
{
orderPropertyNameByJoin(orderPropertyName, orderByType);
return this;
}
if (this.Context.EntityMaintenance.GetEntityInfoWithAttr(typeof(T)).Columns.Any(it =>
it.DbColumnName?.EqualCase(orderPropertyName)==true
|| it.PropertyName?.EqualCase(orderPropertyName)==true))