1
1
using System ;
2
2
using System . Linq ;
3
3
using System . Linq . Expressions ;
4
+ using NHibernate . Dialect ;
4
5
using NHibernate . DomainModel . Northwind . Entities ;
5
6
using NHibernate . Linq ;
6
7
using NUnit . Framework ;
@@ -513,6 +514,9 @@ where subquery.Any(x => x.OrderId == order.OrderId)
513
514
[ Test ( Description = "GH2479" ) ]
514
515
public void OrdersWithSubquery9 ( )
515
516
{
517
+ if ( Dialect is MySQLDialect )
518
+ Assert . Ignore ( "MySQL does not support LIMIT in subqueries." ) ;
519
+
516
520
var ordersQuery = db . Orders
517
521
. Where ( x => x . Employee . EmployeeId > 5 )
518
522
. OrderBy ( x => x . OrderId )
@@ -533,6 +537,9 @@ public void OrdersWithSubquery9()
533
537
[ Test ( Description = "GH2479" ) ]
534
538
public void OrdersWithSubquery10 ( )
535
539
{
540
+ if ( Dialect is MySQLDialect )
541
+ Assert . Ignore ( "MySQL does not support LIMIT in subqueries." ) ;
542
+
536
543
var ordersQuery = db . Orders
537
544
. Where ( x => x . Employee . EmployeeId > 5 )
538
545
. OrderBy ( x => x . OrderId )
@@ -554,6 +561,11 @@ public void OrdersWithSubquery10()
554
561
[ Test ( Description = "GH2479" ) ]
555
562
public void OrdersWithSubquery11 ( )
556
563
{
564
+ if ( Dialect is MySQLDialect )
565
+ Assert . Ignore ( "MySQL does not support LIMIT in subqueries." ) ;
566
+ if ( Dialect is MsSqlCeDialect )
567
+ Assert . Ignore ( "MS SQL CE does not support sorting on a subquery." ) ;
568
+
557
569
var ordersQuery = db . Orders
558
570
. OrderByDescending ( x => x . OrderLines . Count ) . ThenBy ( x => x . OrderId )
559
571
. Take ( 2 ) ;
0 commit comments