Skip to content

Commit 9d244e5

Browse files
Fix #3113
1 parent 986de0a commit 9d244e5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/NHibernate/Hql/Ast/ANTLR/Util/JoinProcessor.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,14 @@ private void AddJoinNodes(IRestrictableStatement query, JoinSequence join, FromE
117117
SqlString frag = joinFragment.ToFromFragmentString;
118118
SqlString whereFrag = joinFragment.ToWhereFragmentString;
119119

120-
// If the from element represents a JOIN_FRAGMENT and it is
121-
// a theta-style join, convert its type from JOIN_FRAGMENT
122-
// to FROM_FRAGMENT
123-
if ( fromElement.Type == HqlSqlWalker.JOIN_FRAGMENT &&
124-
( join.IsThetaStyle || SqlStringHelper.IsNotEmpty( whereFrag ) ) )
120+
// If the from element represents a JOIN_FRAGMENT or ENTITY_JOIN and it is
121+
// a theta-style join, convert its type to FROM_FRAGMENT.
122+
if ((fromElement.Type == HqlSqlWalker.JOIN_FRAGMENT || fromElement.Type == HqlSqlWalker.ENTITY_JOIN) &&
123+
(join.IsThetaStyle || SqlStringHelper.IsNotEmpty(whereFrag)))
125124
{
126125
fromElement.Type = HqlSqlWalker.FROM_FRAGMENT;
127-
fromElement.JoinSequence.SetUseThetaStyle( true ); // this is used during SqlGenerator processing
126+
// This is used during SqlGenerator processing.
127+
fromElement.JoinSequence.SetUseThetaStyle(true);
128128
}
129129

130130
// If there is a FROM fragment and the FROM element is an explicit, then add the from part.

0 commit comments

Comments
 (0)