mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 20:38:16 +08:00
- 修复 pgsql Geo 函数自定义解析深度问题;#1422
This commit is contained in:
@ -937,9 +937,12 @@ namespace FreeSql.Internal
|
||||
{
|
||||
if (exp == null) return "";
|
||||
if (tsc.dbParams != null && tsc.mapColumnTmp != null && tsc.mapColumnTmp.CsType.NullableTypeOrThis() != exp.Type) tsc.SetMapColumnTmp(null);
|
||||
if (tsc.isDisableDiyParse == false)
|
||||
if (tsc.isDisableDiyParse == false && tsc.parseDepth < 20)
|
||||
{
|
||||
var args = new Aop.ParseExpressionEventArgs(exp, ukexp => ExpressionLambdaToSql(ukexp, tsc.CloneDisableDiyParse()), tsc._tables);
|
||||
var aopTsc = tsc.CloneDisableDiyParse();
|
||||
aopTsc.parseDepth = tsc.parseDepth + 1;
|
||||
aopTsc.isDisableDiyParse = false; //用深度控制
|
||||
var args = new Aop.ParseExpressionEventArgs(exp, ukexp => ExpressionLambdaToSql(ukexp, aopTsc), tsc._tables);
|
||||
if (_common._orm.Aop.ParseExpressionHandler != null)
|
||||
{
|
||||
_common._orm.Aop.ParseExpressionHandler(this, args);
|
||||
@ -2276,6 +2279,7 @@ namespace FreeSql.Internal
|
||||
public List<GlobalFilter.Item> whereGlobalFilter { get; set; }
|
||||
public List<DbParameter> dbParams { get; set; }
|
||||
public string alias001 { get; set; } //单表字段的表别名
|
||||
public int parseDepth { get; set; } //Aop 解析深度,防止死循环
|
||||
|
||||
public ExpTSC SetMapColumnTmp(ColumnInfo col)
|
||||
{
|
||||
|
Reference in New Issue
Block a user