mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-19 01:58:13 +08:00
Update subquery bug
This commit is contained in:
@@ -49,6 +49,15 @@ namespace SqlSugar
|
||||
{
|
||||
argExp = ((argExp as LambdaExpression).Body as UnaryExpression).Operand;
|
||||
}
|
||||
var argLambda = argExp as LambdaExpression;
|
||||
if (this.Context.InitMappingInfo != null && argLambda != null && argLambda.Parameters.Count > 0)
|
||||
{
|
||||
foreach (var item in argLambda.Parameters)
|
||||
{
|
||||
this.Context.InitMappingInfo(item.Type);
|
||||
}
|
||||
this.Context.RefreshMapping();
|
||||
}
|
||||
var result = "MAX(" + SubTools.GetMethodValue(Context, argExp, ResolveExpressType.WhereMultiple) + ")";
|
||||
var selfParameterName = Context.GetTranslationColumnName(parametres.First().Name) + UtilConstants.Dot;
|
||||
result = result.Replace(selfParameterName, SubTools.GetSubReplace(this.Context));
|
||||
|
@@ -49,6 +49,15 @@ namespace SqlSugar
|
||||
{
|
||||
argExp = ((argExp as LambdaExpression).Body as UnaryExpression).Operand;
|
||||
}
|
||||
var argLambda = argExp as LambdaExpression;
|
||||
if (this.Context.InitMappingInfo != null && argLambda != null && argLambda.Parameters.Count > 0)
|
||||
{
|
||||
foreach (var item in argLambda.Parameters)
|
||||
{
|
||||
this.Context.InitMappingInfo(item.Type);
|
||||
}
|
||||
this.Context.RefreshMapping();
|
||||
}
|
||||
var result = "MIN(" + SubTools.GetMethodValue(Context, argExp, ResolveExpressType.WhereMultiple) + ")";
|
||||
var selfParameterName = Context.GetTranslationColumnName(parametres.First().Name) + UtilConstants.Dot;
|
||||
result = result.Replace(selfParameterName, SubTools.GetSubReplace(this.Context));
|
||||
|
@@ -49,6 +49,15 @@ namespace SqlSugar
|
||||
{
|
||||
argExp =((argExp as LambdaExpression).Body as UnaryExpression).Operand;
|
||||
}
|
||||
var argLambda = argExp as LambdaExpression;
|
||||
if (this.Context.InitMappingInfo != null&& argLambda != null&&argLambda.Parameters.Count>0)
|
||||
{
|
||||
foreach (var item in argLambda.Parameters)
|
||||
{
|
||||
this.Context.InitMappingInfo(item.Type);
|
||||
}
|
||||
this.Context.RefreshMapping();
|
||||
}
|
||||
var result = "SUM(" + SubTools.GetMethodValue(Context, argExp, ResolveExpressType.WhereMultiple)+")";
|
||||
var selfParameterName = Context.GetTranslationColumnName(parametres.First().Name) + UtilConstants.Dot;
|
||||
result = result.Replace(selfParameterName, SubTools.GetSubReplace(this.Context));
|
||||
|
Reference in New Issue
Block a user