[HHH-10475] skip CompositeIdRowValueTest databases that don't support row value constructor syntax
(cherry picked from commit af7a9a69a8
)
This commit is contained in:
parent
cf7f020a1b
commit
6674e02c87
|
@ -3,8 +3,8 @@ package org.hibernate.jpa.test;
|
|||
import javax.persistence.EntityManager;
|
||||
import javax.persistence.Query;
|
||||
|
||||
import org.hibernate.dialect.Dialect;
|
||||
import org.hibernate.dialect.H2Dialect;
|
||||
import org.hibernate.testing.DialectChecks;
|
||||
import org.hibernate.testing.RequiresDialectFeature;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.hibernate.testing.TestForIssue;
|
||||
|
@ -13,13 +13,9 @@ import static org.junit.Assert.assertThat;
|
|||
import static org.hamcrest.core.Is.is;
|
||||
|
||||
@TestForIssue( jiraKey = "HHH-9029")
|
||||
@RequiresDialectFeature(DialectChecks.SupportsRowValueConstructorSyntaxCheck.class)
|
||||
public class CompositeIdRowValueTest extends BaseEntityManagerFunctionalTestCase {
|
||||
|
||||
@Override
|
||||
protected Dialect getDialect() {
|
||||
return new RowValueConstructorDialect();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTupleAfterSubQuery() {
|
||||
EntityManager em = getOrCreateEntityManager();
|
||||
|
@ -37,10 +33,4 @@ public class CompositeIdRowValueTest extends BaseEntityManagerFunctionalTestCase
|
|||
return new Class[] {EntityWithCompositeId.class, CompositeId.class};
|
||||
}
|
||||
|
||||
public static class RowValueConstructorDialect extends H2Dialect {
|
||||
@Override
|
||||
public boolean supportsRowValueConstructorSyntax() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -111,6 +111,12 @@ abstract public class DialectChecks {
|
|||
}
|
||||
}
|
||||
|
||||
public static class SupportsRowValueConstructorSyntaxCheck implements DialectCheck {
|
||||
public boolean isMatch(Dialect dialect) {
|
||||
return dialect.supportsRowValueConstructorSyntax();
|
||||
}
|
||||
}
|
||||
|
||||
public static class SupportsRowValueConstructorSyntaxInInListCheck implements DialectCheck {
|
||||
public boolean isMatch(Dialect dialect) {
|
||||
return dialect.supportsRowValueConstructorSyntaxInInList();
|
||||
|
|
Loading…
Reference in New Issue