Synchronization code

This commit is contained in:
sunkaixuan
2024-01-08 16:22:45 +08:00
parent 9d8eb2d1e6
commit 2a4926352b
3 changed files with 7 additions and 2 deletions

View File

@@ -681,6 +681,10 @@ namespace SqlSugar
var entityInfo = this.Context.EntityMaintenance.GetEntityInfoWithAttr(joinInfo.EntityType);
result = $" {result} AND {shortName}.{UtilMethods.GetDiscrimator(entityInfo,this.Builder)}";
}
if (joinInfo.JoinType == JoinType.Cross)
{
result = result.Replace(" ON ", " WHERE ");
}
return result;
}
public virtual void Clear()

View File

@@ -585,7 +585,7 @@ namespace SqlSugar
{
++i;
var isLast = joinArray.Length == i;
var isJoinType = item.IsIn(JoinType.Full.ToString(),JoinType.Inner.ToString(), JoinType.Left.ToString(), JoinType.Right.ToString());
var isJoinType = item.IsIn(JoinType.Full.ToString(),JoinType.Inner.ToString(), JoinType.Left.ToString(), JoinType.Right.ToString(),JoinType.Cross.ToString());
if (isJoinType)
{
if (joinValue != null)

View File

@@ -10,6 +10,7 @@ namespace SqlSugar
Inner = 0,
Left = 1,
Right = 2,
Full=3
Full=3,
Cross
}
}