|
1 | | -// Copyright (C) 2003-2010 Xtensive LLC. |
2 | | -// All rights reserved. |
3 | | -// For conditions of distribution and use, see license. |
| 1 | +// Copyright (C) 2009-2021 Xtensive LLC. |
| 2 | +// This code is distributed under MIT license terms. |
| 3 | +// See the License.txt file in the project root for more information. |
4 | 4 | // Created by: Denis Krjuchkov |
5 | 5 | // Created: 2009.11.13 |
6 | 6 |
|
|
17 | 17 |
|
18 | 18 | namespace Xtensive.Orm.Providers |
19 | 19 | { |
20 | | - partial class SqlCompiler |
| 20 | + public partial class SqlCompiler |
21 | 21 | { |
22 | 22 | /// <inheritdoc/> |
23 | 23 | protected override SqlProvider VisitApply(ApplyProvider provider) |
@@ -170,15 +170,15 @@ private SqlSelect ProcessApplyViaCrossApply(ApplyProvider provider, SqlProvider |
170 | 170 | ? (IReadOnlyList<SqlColumn>) leftTable.Columns |
171 | 171 | : left.Request.Statement.Columns; |
172 | 172 |
|
173 | | - var rightShouldUseReference = ShouldUseQueryReference(provider, right); |
| 173 | + var rightShouldUseReference = ShouldUseQueryReference(provider, right) || forceApplyViaReference; |
174 | 174 | var rightTable = rightShouldUseReference |
175 | 175 | ? right.PermanentReference |
176 | 176 | : right.Request.Statement.From; |
177 | 177 | var rightColumns = rightShouldUseReference |
178 | 178 | ? (IReadOnlyList<SqlColumn>) rightTable.Columns |
179 | 179 | : right.Request.Statement.Columns; |
180 | 180 |
|
181 | | - var joinType = provider.ApplyType==JoinType.LeftOuter |
| 181 | + var joinType = provider.ApplyType == JoinType.LeftOuter |
182 | 182 | ? SqlJoinType.LeftOuterApply |
183 | 183 | : SqlJoinType.CrossApply; |
184 | 184 |
|
|
0 commit comments