@@ -213,10 +213,10 @@ protected virtual void FromFragmentSeparator(IASTNode a)
213213 else if ( right . RealOrigin == left || ( right . RealOrigin != null && right . RealOrigin == left . RealOrigin ) )
214214 {
215215 // right represents a joins originating from left; or
216- // both right and left reprersent joins originating from the same FromElement
216+ // both right and left represent joins originating from the same FromElement
217217 if ( right . JoinSequence != null && right . JoinSequence . IsThetaStyle )
218218 {
219- Out ( ", " ) ;
219+ WriteCrossJoinSeparator ( ) ;
220220 }
221221 else
222222 {
@@ -226,10 +226,15 @@ protected virtual void FromFragmentSeparator(IASTNode a)
226226 else
227227 {
228228 // these are just two unrelated table references
229- Out ( ", " ) ;
229+ WriteCrossJoinSeparator ( ) ;
230230 }
231231 }
232232
233+ private void WriteCrossJoinSeparator ( )
234+ {
235+ Out ( sessionFactory . Dialect . CrossJoinSeparator ) ;
236+ }
237+
233238 protected virtual void NestedFromFragment ( IASTNode d , IASTNode parent )
234239 {
235240 // check a set of parent/child nodes in the from-clause tree
@@ -246,7 +251,7 @@ protected virtual void NestedFromFragment(IASTNode d, IASTNode parent)
246251 // right represents a joins originating from left...
247252 if ( right . JoinSequence != null && right . JoinSequence . IsThetaStyle )
248253 {
249- Out ( ", " ) ;
254+ WriteCrossJoinSeparator ( ) ;
250255 }
251256 else
252257 {
@@ -257,7 +262,7 @@ protected virtual void NestedFromFragment(IASTNode d, IASTNode parent)
257262 {
258263 // not so sure this is even valid subtree. but if it was, it'd
259264 // represent two unrelated table references...
260- Out ( ", " ) ;
265+ WriteCrossJoinSeparator ( ) ;
261266 }
262267 }
263268
0 commit comments