diff --git a/hibernate-core/src/main/java/org/hibernate/boot/internal/SessionFactoryOptionsBuilder.java b/hibernate-core/src/main/java/org/hibernate/boot/internal/SessionFactoryOptionsBuilder.java index 7e0cc2334f..b60874ac67 100644 --- a/hibernate-core/src/main/java/org/hibernate/boot/internal/SessionFactoryOptionsBuilder.java +++ b/hibernate-core/src/main/java/org/hibernate/boot/internal/SessionFactoryOptionsBuilder.java @@ -593,7 +593,7 @@ public class SessionFactoryOptionsBuilder implements SessionFactoryOptions { private boolean disallowBatchUpdates(Dialect dialect, ExtractedDatabaseMetaData meta) { final Boolean dialectAnswer = dialect.supportsBatchUpdates(); if ( dialectAnswer != null ) { - return dialectAnswer; + return !dialectAnswer; } return !meta.supportsBatchUpdates(); } diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/Dialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/Dialect.java index 988bf23d8e..f9873e57da 100644 --- a/hibernate-core/src/main/java/org/hibernate/dialect/Dialect.java +++ b/hibernate-core/src/main/java/org/hibernate/dialect/Dialect.java @@ -4953,7 +4953,7 @@ public abstract class Dialect implements ConversionContext, TypeContributor, Fun } /** - * Does this Dialect support {@linkplain PreparedStatement#addBatch() batch updates}. + * Whether this Dialect supports {@linkplain PreparedStatement#addBatch() batch updates}. * * @return {@code true} indicates it does; {@code false} indicates it does not; {@code null} indicates * it might and that database-metadata should be consulted. @@ -4966,7 +4966,7 @@ public abstract class Dialect implements ConversionContext, TypeContributor, Fun } /** - * Does this Dialect support {@linkplain PreparedStatement#addBatch() batch updates}. + * Whether this Dialect supports the JDBC {@link java.sql.Types#REF_CURSOR} type. * * @return {@code true} indicates it does; {@code false} indicates it does not; {@code null} indicates * it might and that database-metadata should be consulted