mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-18 20:08:15 +08:00
- 修复 AsTable 子查询未传播的 bug;#1103
This commit is contained in:
@ -67,7 +67,7 @@ namespace FreeSql.Internal.CommonProvider
|
||||
var index = -10000; //临时规则,不返回 as1
|
||||
|
||||
if (selector != null)
|
||||
_comonExp.ReadAnonymousField(_select._tables, field, _map, ref index, selector, null, null, _select._whereGlobalFilter, null, null, false); //不走 DTO 映射,不处理 IncludeMany
|
||||
_comonExp.ReadAnonymousField(_select._tables, _select._tableRule, field, _map, ref index, selector, null, null, _select._whereGlobalFilter, null, null, false); //不走 DTO 映射,不处理 IncludeMany
|
||||
_field = field.ToString();
|
||||
}
|
||||
|
||||
@ -162,7 +162,7 @@ namespace FreeSql.Internal.CommonProvider
|
||||
{
|
||||
if (condition == false) return this;
|
||||
_lambdaParameter = column?.Parameters[0];
|
||||
var sql = _comonExp.ExpressionWhereLambda(null, column, this, null, null);
|
||||
var sql = _comonExp.ExpressionWhereLambda(null, null, column, this, null, null);
|
||||
var method = _select.GetType().GetMethod("OrderBy", new[] { typeof(string), typeof(object) });
|
||||
method.Invoke(_select, new object[] { descending ? $"{sql} DESC" : sql, null });
|
||||
return this;
|
||||
@ -174,7 +174,7 @@ namespace FreeSql.Internal.CommonProvider
|
||||
{
|
||||
if (condition == false) return this;
|
||||
_lambdaParameter = exp?.Parameters[0];
|
||||
var sql = _comonExp.ExpressionWhereLambda(null, exp, this, null, null);
|
||||
var sql = _comonExp.ExpressionWhereLambda(null, null, exp, this, null, null);
|
||||
var method = _select.GetType().GetMethod("Where", new[] { typeof(string), typeof(object) });
|
||||
method.Invoke(_select, new object[] { sql, null });
|
||||
return this;
|
||||
|
Reference in New Issue
Block a user