File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,5 +7,16 @@ public class Include
77 public string ForeignKey { get ; set ; }
88 public string LocalKey { get ; set ; }
99 public bool IsMany { get ; set ; }
10+
11+ public Include Clone ( )
12+ {
13+ var clone = new Include ( ) ;
14+ clone . Name = this . Name ;
15+ clone . Query = this . Query . Clone ( ) ;
16+ clone . ForeignKey = this . ForeignKey ;
17+ clone . LocalKey = this . LocalKey ;
18+ clone . IsMany = this . IsMany ;
19+ return clone ;
20+ }
1021 }
1122}
Original file line number Diff line number Diff line change @@ -51,12 +51,12 @@ internal int GetLimit(string engineCode = null)
5151 public override Query Clone ( )
5252 {
5353 var clone = base . Clone ( ) ;
54- clone . Parent = Parent ;
54+ clone . Parent = ( Parent as Query ) ? . Clone ( ) ;
5555 clone . QueryAlias = QueryAlias ;
5656 clone . IsDistinct = IsDistinct ;
5757 clone . Method = Method ;
58- clone . Includes = Includes ;
59- clone . Variables = Variables ;
58+ clone . Includes = Includes . Select ( i => i . Clone ( ) ) . ToList ( ) ;
59+ clone . Variables = Variables . ToDictionary ( ) ;
6060 return clone ;
6161 }
6262
You can’t perform that action at this time.
0 commit comments