diff --git a/hibernate-core/src/test/java/org/hibernate/test/hql/CriteriaHQLAlignmentTest.java b/hibernate-core/src/test/java/org/hibernate/test/hql/CriteriaHQLAlignmentTest.java index c1f3d8d80c..365c044077 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/hql/CriteriaHQLAlignmentTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/hql/CriteriaHQLAlignmentTest.java @@ -280,6 +280,15 @@ public class CriteriaHQLAlignmentTest extends QueryTranslatorTestCase { throw ex; } } + catch (PersistenceException e) { + SQLGrammarException cause = assertTyping( SQLGrammarException.class, e.getCause() ); + if ( ! getDialect().supportsTupleCounts() ) { + // expected + } + else { + throw e; + } + } finally { t.rollback(); s.close();