@@ -513,9 +513,8 @@ public void UpdateOnManyToOne()
513
513
ITransaction t = s . BeginTransaction ( ) ;
514
514
515
515
s . CreateQuery ( "update Animal a set a.mother = null where a.id = 2" ) . ExecuteUpdate ( ) ;
516
- if ( ! ( Dialect is MySQLDialect ) )
516
+ if ( Dialect . SupportsSubqueryOnMutatingTable )
517
517
{
518
- // MySQL does not support (even un-correlated) subqueries against the update-mutating table
519
518
s . CreateQuery ( "update Animal a set a.mother = (from Animal where id = 1) where a.id = 2" ) . ExecuteUpdate ( ) ;
520
519
}
521
520
@@ -624,9 +623,8 @@ public void UpdateOnAnimal()
624
623
. ExecuteUpdate ( ) ;
625
624
Assert . That ( count , Is . EqualTo ( 6 ) , "incorrect count on 'complex' update assignment" ) ;
626
625
627
- if ( ! ( Dialect is MySQLDialect ) )
626
+ if ( Dialect . SupportsSubqueryOnMutatingTable )
628
627
{
629
- // MySQL does not support (even un-correlated) subqueries against the update-mutating table
630
628
s . CreateQuery ( "update Animal set bodyWeight = ( select max(bodyWeight) from Animal )" ) . ExecuteUpdate ( ) ;
631
629
}
632
630
@@ -682,9 +680,8 @@ public void UpdateOnMammal()
682
680
count = s . CreateQuery ( "update Mammal set bodyWeight = 25" ) . ExecuteUpdate ( ) ;
683
681
Assert . That ( count , Is . EqualTo ( 2 ) , "incorrect update count against 'middle' of joined-subclass hierarchy" ) ;
684
682
685
- if ( ! ( Dialect is MySQLDialect ) )
683
+ if ( Dialect . SupportsSubqueryOnMutatingTable )
686
684
{
687
- // MySQL does not support (even un-correlated) subqueries against the update-mutating table
688
685
count = s . CreateQuery ( "update Mammal set bodyWeight = ( select max(bodyWeight) from Animal )" ) . ExecuteUpdate ( ) ;
689
686
Assert . That ( count , Is . EqualTo ( 2 ) , "incorrect update count against 'middle' of joined-subclass hierarchy" ) ;
690
687
}
0 commit comments