HHH-6867 skip org.hibernate.test.criteria.CriteriaQueryTest#testMultiplePropertiesSubquery on DB2 since DB2 doesn't support this tuple sql syntax

This commit is contained in:
Strong Liu 2011-12-01 17:34:42 +08:00
parent f9e947035e
commit 3c3a74e010
1 changed files with 25 additions and 22 deletions

View File

@ -1762,13 +1762,14 @@ public class CriteriaQueryTest extends BaseCoreFunctionalTestCase {
.add( Projections.property( "height" ) ) )
.add( Restrictions.eq( "name", "Lukasz" )
);
List result = session.createCriteria( Woman.class )
List result;
if ( getDialect().supportsRowValueConstructorSyntax() ) {
result = session.createCriteria( Woman.class )
.add( Subqueries.propertiesEq( new String[] { "weight", "height" }, sizeQuery ) )
.list();
assertEquals( 1, result.size() );
assertEquals( kinga, result.get( 0 ) );
}
if ( getDialect().supportsRowValueConstructorSyntaxInInList() ) {
result = session.createCriteria( Woman.class )
.add( Subqueries.propertiesIn( new String[] { "weight", "height" }, sizeQuery ) )
@ -1782,18 +1783,20 @@ public class CriteriaQueryTest extends BaseCoreFunctionalTestCase {
session = openSession();
tx = session.beginTransaction();
if ( getDialect().supportsRowValueConstructorSyntax() ) {
sizeQuery = DetachedCriteria.forClass( Man.class ).setProjection(
Projections.projectionList().add( Projections.property( "weight" ) )
.add( Projections.property( "height" ) ) )
.add( Restrictions.ne( "name", "Lukasz" )
.add( Projections.property( "height" ) )
)
.add(
Restrictions.ne( "name", "Lukasz" )
);
result = session.createCriteria( Woman.class )
.add( Subqueries.propertiesNotEq( new String[] { "weight", "height" }, sizeQuery ) )
.list();
assertEquals( 1, result.size() );
assertEquals( kinga, result.get( 0 ) );
}
if (getDialect().supportsRowValueConstructorSyntaxInInList()) {
result = session.createCriteria( Woman.class )
.add( Subqueries.propertiesNotIn( new String[] { "weight", "height" }, sizeQuery ) )