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:
parent
f9e947035e
commit
3c3a74e010
|
@ -1762,17 +1762,18 @@ public class CriteriaQueryTest extends BaseCoreFunctionalTestCase {
|
||||||
.add( Projections.property( "height" ) ) )
|
.add( Projections.property( "height" ) ) )
|
||||||
.add( Restrictions.eq( "name", "Lukasz" )
|
.add( Restrictions.eq( "name", "Lukasz" )
|
||||||
);
|
);
|
||||||
|
List result;
|
||||||
List result = session.createCriteria( Woman.class )
|
if ( getDialect().supportsRowValueConstructorSyntax() ) {
|
||||||
.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 )
|
result = session.createCriteria( Woman.class )
|
||||||
.add( Subqueries.propertiesIn( new String[] { "weight", "height" }, sizeQuery ) )
|
.add( Subqueries.propertiesEq( new String[] { "weight", "height" }, sizeQuery ) )
|
||||||
.list();
|
.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 ) )
|
||||||
|
.list();
|
||||||
assertEquals( 1, result.size() );
|
assertEquals( 1, result.size() );
|
||||||
assertEquals( kinga, result.get( 0 ) );
|
assertEquals( kinga, result.get( 0 ) );
|
||||||
}
|
}
|
||||||
|
@ -1782,18 +1783,20 @@ public class CriteriaQueryTest extends BaseCoreFunctionalTestCase {
|
||||||
|
|
||||||
session = openSession();
|
session = openSession();
|
||||||
tx = session.beginTransaction();
|
tx = session.beginTransaction();
|
||||||
|
if ( getDialect().supportsRowValueConstructorSyntax() ) {
|
||||||
sizeQuery = DetachedCriteria.forClass( Man.class ).setProjection(
|
sizeQuery = DetachedCriteria.forClass( Man.class ).setProjection(
|
||||||
Projections.projectionList().add( Projections.property( "weight" ) )
|
Projections.projectionList().add( Projections.property( "weight" ) )
|
||||||
.add( Projections.property( "height" ) ) )
|
.add( Projections.property( "height" ) )
|
||||||
.add( Restrictions.ne( "name", "Lukasz" )
|
)
|
||||||
);
|
.add(
|
||||||
result = session.createCriteria( Woman.class )
|
Restrictions.ne( "name", "Lukasz" )
|
||||||
.add( Subqueries.propertiesNotEq( new String[] { "weight", "height" }, sizeQuery ) )
|
);
|
||||||
.list();
|
result = session.createCriteria( Woman.class )
|
||||||
assertEquals( 1, result.size() );
|
.add( Subqueries.propertiesNotEq( new String[] { "weight", "height" }, sizeQuery ) )
|
||||||
assertEquals( kinga, result.get( 0 ) );
|
.list();
|
||||||
|
assertEquals( 1, result.size() );
|
||||||
|
assertEquals( kinga, result.get( 0 ) );
|
||||||
|
}
|
||||||
if (getDialect().supportsRowValueConstructorSyntaxInInList()) {
|
if (getDialect().supportsRowValueConstructorSyntaxInInList()) {
|
||||||
result = session.createCriteria( Woman.class )
|
result = session.createCriteria( Woman.class )
|
||||||
.add( Subqueries.propertiesNotIn( new String[] { "weight", "height" }, sizeQuery ) )
|
.add( Subqueries.propertiesNotIn( new String[] { "weight", "height" }, sizeQuery ) )
|
||||||
|
|
Loading…
Reference in New Issue