{"record":{"id":"808ab6e35c698524","repo":"hibernate/hibernate-orm","slug":"batchbuilder-does-not-support-single-statement-bat","errorCode":null,"errorMessage":"BatchBuilder does not support single-statement batches: {className}","messagePattern":"BatchBuilder does not support single-statement batches: (.+?)","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/engine/jdbc/batch/spi/BatchBuilder.java","lineNumber":77,"sourceCode":"\t * for grouped mutation batching do not necessarily know how to build this\n\t * specialization.  Builders that want to support graph-style single statement\n\t * batching should override this method.\n\t *\n\t * @param key key identifying compatible rows for the batch\n\t * @param batchSize explicit batch size override, or {@code null} to use the\n\t * builder's default\n\t * @param mutationOperation preparable mutation operation representing the\n\t * single statement shape\n\t * @param jdbcCoordinator JDBC coordinator that will own the active batch\n\t *\n\t * @return a single-statement batch instance\n\t */\n\tdefault SingleStatementBatch buildSingleStatementBatch(\n\t\t\tBatchKey key,\n\t\t\tInteger batchSize,\n\t\t\tPreparableMutationOperation mutationOperation,\n\t\t\tJdbcCoordinator jdbcCoordinator) {\n\t\tthrow new UnsupportedOperationException(\n\t\t\t\t\"BatchBuilder does not support single-statement batches: \" + getClass().getName()\n\t\t);\n\t}\n}\n","sourceCodeStart":59,"sourceCodeEnd":82,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/engine/jdbc/batch/spi/BatchBuilder.java#L59-L82","documentation":"Error \"BatchBuilder does not support single-statement batches: {className}\" thrown in hibernate/hibernate-orm.","triggerScenarios":"Thrown at hibernate-core/src/main/java/org/hibernate/engine/jdbc/batch/spi/BatchBuilder.java:77 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a multi-statement batch or a BatchBuilder that supports single-statement batches","Do not submit single-statement batches to this BatchBuilder implementation"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fad1729dce015f908198d57a8d80274a30f905a5","analyzedAt":"2026-08-22T04:13:57.527Z","schemaVersion":2},"datasetVersion":"2026-08-22T09:17:25.309Z"}