diff --git a/MarkMpn.Sql4Cds.Engine/TSqlFragmentExtensions.cs b/MarkMpn.Sql4Cds.Engine/TSqlFragmentExtensions.cs index 87875986..bfa88ec6 100644 --- a/MarkMpn.Sql4Cds.Engine/TSqlFragmentExtensions.cs +++ b/MarkMpn.Sql4Cds.Engine/TSqlFragmentExtensions.cs @@ -507,6 +507,18 @@ public static T Clone(this T fragment) where T : TSqlFragment return (T)(object)clone; } + if (fragment is QualifiedJoin qualifiedJoin) + { + return (T)(object)new QualifiedJoin + { + FirstTableReference = qualifiedJoin.FirstTableReference.Clone(), + JoinHint = qualifiedJoin.JoinHint, + QualifiedJoinType = qualifiedJoin.QualifiedJoinType, + SearchCondition = qualifiedJoin.SearchCondition?.Clone(), + SecondTableReference = qualifiedJoin.SecondTableReference.Clone() + }; + } + if (fragment is GroupByClause groupBy) { var clone = new GroupByClause