Synchronous generation

This commit is contained in:
sunkaixuan 2023-05-19 13:45:01 +08:00
parent 0cdd5ada25
commit d31f248256

View File

@ -686,7 +686,7 @@ namespace SqlSugar
{
return result;
}
if (this.IsSqlQuery&&this.OldSql.HasValue() && (Skip == null && Take == null) && (this.WhereInfos == null || this.WhereInfos.Count == 0))
if (!string.IsNullOrEmpty(OrderByValue)&&this.IsSqlQuery&&this.OldSql.HasValue() && (Skip == null && Take == null) && (this.WhereInfos == null || this.WhereInfos.Count == 0))
{
return this.OldSql;
}