HHH-15281 INSERTs/UPDATEs no longer executed as JDBC Batch statements if hibernate.temp.use_jdbc_metadata_defaults is set to false

This commit is contained in:
Andrea Boriero 2022-05-23 17:50:26 +02:00 committed by Christian Beikov
parent 6f4d28b034
commit bf547fe432
2 changed files with 4 additions and 3 deletions

View File

@ -169,7 +169,8 @@ public class ExtractedDatabaseMetaDataImpl implements ExtractedDatabaseMetaData
private boolean supportsNamedParameters;
private boolean supportsScrollableResults;
private boolean supportsGetGeneratedKeys;
private boolean supportsBatchUpdates;
// In absence of DatabaseMetaData batching updates is assumed to be supported
private boolean supportsBatchUpdates = true;
private boolean supportsDataDefinitionInTransaction;
private boolean doesDataDefinitionCauseTransactionCommit;
private SQLStateType sqlStateType;

View File

@ -44,7 +44,7 @@ public class NoDatabaseMetaDataTest extends BaseUnitTestCase {
assertFalse( extractedDatabaseMetaData.supportsRefCursors() );
assertFalse( extractedDatabaseMetaData.supportsScrollableResults() );
assertFalse( extractedDatabaseMetaData.supportsGetGeneratedKeys() );
assertFalse( extractedDatabaseMetaData.supportsBatchUpdates() );
assertTrue( extractedDatabaseMetaData.supportsBatchUpdates() );
assertFalse( extractedDatabaseMetaData.supportsDataDefinitionInTransaction() );
assertFalse( extractedDatabaseMetaData.doesDataDefinitionCauseTransactionCommit() );
assertNull( extractedDatabaseMetaData.getSqlStateType() );
@ -68,7 +68,7 @@ public class NoDatabaseMetaDataTest extends BaseUnitTestCase {
assertFalse( extractedDatabaseMetaData.supportsRefCursors() );
assertFalse( extractedDatabaseMetaData.supportsScrollableResults() );
assertFalse( extractedDatabaseMetaData.supportsGetGeneratedKeys() );
assertFalse( extractedDatabaseMetaData.supportsBatchUpdates() );
assertTrue( extractedDatabaseMetaData.supportsBatchUpdates() );
assertFalse( extractedDatabaseMetaData.supportsDataDefinitionInTransaction() );
assertFalse( extractedDatabaseMetaData.doesDataDefinitionCauseTransactionCommit() );
assertNull( extractedDatabaseMetaData.getSqlStateType() );