Add feature requirement for multi-insert test
This commit is contained in:
parent
6e8f344a9f
commit
2666f3f6e0
|
@ -50,6 +50,8 @@ import org.hibernate.userguide.model.WireTransferPayment;
|
|||
|
||||
import org.hibernate.testing.RequiresDialect;
|
||||
import org.hibernate.testing.SkipForDialect;
|
||||
import org.hibernate.testing.DialectChecks;
|
||||
import org.hibernate.testing.RequiresDialectFeature;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
|
@ -223,11 +225,11 @@ public class HQLTest extends BaseEntityManagerFunctionalTestCase {
|
|||
});
|
||||
}
|
||||
|
||||
@Test @SkipForDialect(SybaseDialect.class)
|
||||
@Test
|
||||
@RequiresDialectFeature(DialectChecks.SupportsValuesListForInsert.class)
|
||||
public void hql_multi_insert_example() {
|
||||
doInJPA(this::entityManagerFactory, entityManager -> {
|
||||
//tag::hql-insert-example[]
|
||||
|
||||
entityManager.createQuery(
|
||||
"insert Person (id, name) " +
|
||||
"values (101L, 'J A Doe III'), " +
|
||||
|
|
|
@ -274,4 +274,10 @@ abstract public class DialectChecks {
|
|||
}
|
||||
}
|
||||
|
||||
public static class SupportsValuesListForInsert implements DialectCheck {
|
||||
public boolean isMatch(Dialect dialect) {
|
||||
return dialect.supportsValuesListForInsert();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue