hibernate/hibernate-orm · error · IdentifierGenerationException
Generated column values were not provided for composite id p
Error message
Generated column values were not provided for composite id property: ${propertyName} What it means
Error "Generated column values were not provided for composite id property: ${propertyName}" thrown in hibernate/hibernate-orm.
Source
Thrown at hibernate-core/src/main/java/org/hibernate/boot/model/internal/GeneratorBinder.java:983
}
}
for ( int j = 0; j < span; j++ ) {
generatedOnExecutionColumns[columnIndex + j] = true;
}
if ( onExecutionGenerator.generatesOnInsert() ) {
if ( !onExecutionGenerator.referenceColumnsInSql( dialect, EventType.INSERT ) ) {
for ( int j = 0; j < span; j++ ) {
columnInclusions[columnIndex + j] = false;
}
}
else if ( onExecutionGenerator.writePropertyValue( EventType.INSERT ) ) {
// leave default parameter markers in place
}
else {
final String[] referencedColumnValues =
onExecutionGenerator.getReferencedColumnValues( dialect, EventType.INSERT );
if ( referencedColumnValues == null ) {
throw new IdentifierGenerationException(
"Generated column values were not provided for composite id property: "
+ property.getName()
);
}
if ( referencedColumnValues.length != span ) {
throw new IdentifierGenerationException(
"Mismatch between generated column values and column count for composite id property: "
+ property.getName()
);
}
System.arraycopy( referencedColumnValues, 0, columnValues, columnIndex, span );
}
}
else if ( !onExecutionGenerator.allowMutation() ) {
for ( int j = 0; j < span; j++ ) {
columnInclusions[columnIndex + j] = false;
}
}View on GitHub (pinned to fad1729dce)
Solutions
- Provide generated column values for every column of the composite id property.
When it happens
Trigger: Generated column values declared for a composite identifier are missing or do not match the column count.
Common situations: Composite ids with per-column generated values where the supplied values are absent or fewer/more than the id columns.
AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22).
Data as JSON: /api/errors/fc78a6ee6c8d7d4c.
Report an issue: GitHub.