mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-23 04:23:47 +08:00
Synchronization code
This commit is contained in:
@@ -43,7 +43,8 @@ namespace SqlSugar
|
||||
var argExp = exp.Arguments[0];
|
||||
var copyContext = this.Context;
|
||||
|
||||
if (this.Context.JoinIndex > 0)
|
||||
var pars = ExpressionTool.GetParameters(expression).Distinct();
|
||||
if (this.Context.JoinIndex > 0|| pars.Count()>1)
|
||||
{
|
||||
copyContext = this.Context.GetCopyContextWithMapping();
|
||||
copyContext.IsSingle = false;
|
||||
@@ -51,7 +52,7 @@ namespace SqlSugar
|
||||
|
||||
var result = "AND " + SubTools.GetMethodValue(copyContext, argExp, ResolveExpressType.WhereMultiple);
|
||||
|
||||
if (this.Context.JoinIndex > 0)
|
||||
if (this.Context.JoinIndex > 0 || pars.Count() > 1)
|
||||
{
|
||||
this.Context.Parameters.AddRange(copyContext.Parameters);
|
||||
this.Context.Index = copyContext.Index;
|
||||
|
@@ -46,14 +46,15 @@ namespace SqlSugar
|
||||
}
|
||||
var argExp = exp.Arguments[0];
|
||||
var copyContext = this.Context;
|
||||
if (this.Context.JoinIndex > 0)
|
||||
var pars=ExpressionTool.GetParameters(expression).Distinct();
|
||||
if (this.Context.JoinIndex > 0|| pars.Count()>1)
|
||||
{
|
||||
copyContext = this.Context.GetCopyContextWithMapping();
|
||||
copyContext.IsSingle = false;
|
||||
}
|
||||
var result = "WHERE " + SubTools.GetMethodValue(copyContext, argExp, ResolveExpressType.WhereMultiple);
|
||||
|
||||
if (this.Context.JoinIndex > 0)
|
||||
if (this.Context.JoinIndex > 0 ||pars.Count() > 1)
|
||||
{
|
||||
this.Context.Parameters.AddRange(copyContext.Parameters);
|
||||
this.Context.Index = copyContext.Index;
|
||||
|
Reference in New Issue
Block a user