{"record":{"id":"fc78a6ee6c8d7d4c","repo":"hibernate/hibernate-orm","slug":"generated-column-values-were-not-provided-for-comp","errorCode":null,"errorMessage":"Generated column values were not provided for composite id property: ${propertyName}","messagePattern":"Generated column values were not provided for composite id property: (.+?)","errorType":"exception","errorClass":"IdentifierGenerationException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/boot/model/internal/GeneratorBinder.java","lineNumber":983,"sourceCode":"\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor ( int j = 0; j < span; j++ ) {\n\t\t\t\t\tgeneratedOnExecutionColumns[columnIndex + j] = true;\n\t\t\t\t}\n\t\t\t\tif ( onExecutionGenerator.generatesOnInsert() ) {\n\t\t\t\t\tif ( !onExecutionGenerator.referenceColumnsInSql( dialect, EventType.INSERT ) ) {\n\t\t\t\t\t\tfor ( int j = 0; j < span; j++ ) {\n\t\t\t\t\t\t\tcolumnInclusions[columnIndex + j] = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if ( onExecutionGenerator.writePropertyValue( EventType.INSERT ) ) {\n\t\t\t\t\t\t// leave default parameter markers in place\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tfinal String[] referencedColumnValues =\n\t\t\t\t\t\t\t\tonExecutionGenerator.getReferencedColumnValues( dialect, EventType.INSERT );\n\t\t\t\t\t\tif ( referencedColumnValues == null ) {\n\t\t\t\t\t\t\tthrow new IdentifierGenerationException(\n\t\t\t\t\t\t\t\t\t\"Generated column values were not provided for composite id property: \"\n\t\t\t\t\t\t\t\t\t\t\t+ property.getName()\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( referencedColumnValues.length != span ) {\n\t\t\t\t\t\t\tthrow new IdentifierGenerationException(\n\t\t\t\t\t\t\t\t\t\"Mismatch between generated column values and column count for composite id property: \"\n\t\t\t\t\t\t\t\t\t\t\t+ property.getName()\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tSystem.arraycopy( referencedColumnValues, 0, columnValues, columnIndex, span );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if ( !onExecutionGenerator.allowMutation() ) {\n\t\t\t\t\tfor ( int j = 0; j < span; j++ ) {\n\t\t\t\t\t\tcolumnInclusions[columnIndex + j] = false;\n\t\t\t\t\t}\n\t\t\t\t}","sourceCodeStart":965,"sourceCodeEnd":1001,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/boot/model/internal/GeneratorBinder.java#L965-L1001","documentation":"Error \"Generated column values were not provided for composite id property: ${propertyName}\" thrown in hibernate/hibernate-orm.","triggerScenarios":"Generated column values declared for a composite identifier are missing or do not match the column count.","commonSituations":"Composite ids with per-column generated values where the supplied values are absent or fewer/more than the id columns.","solutions":["Provide generated column values for every column of the composite id property."],"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"}