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 Sanne Grinovero
parent 11b8352f13
commit 8f5c7881ff
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() );