File tree 3 files changed +21
-2
lines changed
3 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -344,10 +344,16 @@ public async Task NullableEntityProjectionAsync()
344
344
var withValidManyToOneList = await ( session . Query < NullableOwner > ( ) . Where ( x => x . ManyToOne != null ) . Select ( x => new { x . Name , ManyToOneId = ( Guid ? ) x . ManyToOne . Id } ) . ToListAsync ( ) ) ;
345
345
var withValidManyToOneList2 = await ( session . CreateQuery ( "from NullableOwner ex where not ex.ManyToOne is null" ) . ListAsync < NullableOwner > ( ) ) ;
346
346
var withNullManyToOneList = await ( session . Query < NullableOwner > ( ) . Where ( x => x . ManyToOne == null ) . ToListAsync ( ) ) ;
347
+ var withNullManyToOneJoinedList =
348
+ await ( ( from x in session . Query < NullableOwner > ( )
349
+ from x2 in session . Query < NullableOwner > ( )
350
+ where x == x2 && x . ManyToOne == null && x . OneToOne . Name == null
351
+ select x2 ) . ToListAsync ( ) ) ;
347
352
Assert . That ( fullList . Count , Is . EqualTo ( 2 ) ) ;
348
353
Assert . That ( withValidManyToOneList . Count , Is . EqualTo ( 0 ) ) ;
349
354
Assert . That ( withValidManyToOneList2 . Count , Is . EqualTo ( 0 ) ) ;
350
355
Assert . That ( withNullManyToOneList . Count , Is . EqualTo ( 2 ) ) ;
356
+ Assert . That ( withNullManyToOneJoinedList . Count , Is . EqualTo ( 2 ) ) ;
351
357
}
352
358
}
353
359
Original file line number Diff line number Diff line change @@ -332,10 +332,16 @@ public void NullableEntityProjection()
332
332
var withValidManyToOneList = session . Query < NullableOwner > ( ) . Where ( x => x . ManyToOne != null ) . Select ( x => new { x . Name , ManyToOneId = ( Guid ? ) x . ManyToOne . Id } ) . ToList ( ) ;
333
333
var withValidManyToOneList2 = session . CreateQuery ( "from NullableOwner ex where not ex.ManyToOne is null" ) . List < NullableOwner > ( ) ;
334
334
var withNullManyToOneList = session . Query < NullableOwner > ( ) . Where ( x => x . ManyToOne == null ) . ToList ( ) ;
335
+ var withNullManyToOneJoinedList =
336
+ ( from x in session . Query < NullableOwner > ( )
337
+ from x2 in session . Query < NullableOwner > ( )
338
+ where x == x2 && x . ManyToOne == null && x . OneToOne . Name == null
339
+ select x2 ) . ToList ( ) ;
335
340
Assert . That ( fullList . Count , Is . EqualTo ( 2 ) ) ;
336
341
Assert . That ( withValidManyToOneList . Count , Is . EqualTo ( 0 ) ) ;
337
342
Assert . That ( withValidManyToOneList2 . Count , Is . EqualTo ( 0 ) ) ;
338
343
Assert . That ( withNullManyToOneList . Count , Is . EqualTo ( 2 ) ) ;
344
+ Assert . That ( withNullManyToOneJoinedList . Count , Is . EqualTo ( 2 ) ) ;
339
345
}
340
346
}
341
347
Original file line number Diff line number Diff line change @@ -229,8 +229,15 @@ protected virtual void FromFragmentSeparator(IASTNode a)
229
229
}
230
230
else
231
231
{
232
- // these are just two unrelated table references
233
- Out ( ", " ) ;
232
+ if ( right . JoinSequence ? . IsThetaStyle == false && right . JoinSequence . JoinCount != 0 )
233
+ {
234
+ Out ( " " ) ;
235
+ }
236
+ else
237
+ {
238
+ // these are just two unrelated table references
239
+ Out ( ", " ) ;
240
+ }
234
241
}
235
242
}
236
243
You can’t perform that action at this time.
0 commit comments