hibernate/hibernate-orm · error · UnsupportedOperationException
Support for %s foreign-keys not yet implemented: %s -> %s
Error message
Support for %s foreign-keys not yet implemented: %s -> %s
What it means
Error "Support for %s foreign-keys not yet implemented: %s -> %s" thrown in hibernate/hibernate-orm.
Source
Thrown at hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/MappingModelCreationHelper.java:1017
final var value = bootProperty.getValue();
final var embeddedForeignKeyDescriptor = buildEmbeddableForeignKeyDescriptor(
getPropertyPath( attributeMapping.getNavigableRole() ),
embeddableValuedModelPart,
bootValueMapping,
attributeMapping.getDeclaringType(),
attributeMapping.findContainingEntityMapping(),
null,
swapDirection,
value.getColumnInsertability(),
value.getColumnUpdateability(),
creationProcess
);
attributeMapping.setForeignKeyDescriptor( embeddedForeignKeyDescriptor );
attributeMapping.setupCircularFetchModelPart( creationProcess );
// creationProcess.registerForeignKey( attributeMapping, embeddedForeignKeyDescriptor );
}
else {
throw new UnsupportedOperationException(
"Support for " + fkTarget.getClass() + " foreign-keys not yet implemented: " +
bootProperty.getPersistentClass().getEntityName() + " -> " + bootProperty.getName()
);
}
return true;
}
private static PropertyAccess getDeclaringKeyPropertyAccess(
ToOneAttributeMapping attributeMapping,
ToOne bootValueMapping,
PropertyAccess inversePropertyAccess,
PropertyBasedMapping simpleFkTarget) {
if ( inversePropertyAccess == null ) {
if ( bootValueMapping instanceof OneToOne ) {
final var identifierMapping = attributeMapping.findContainingEntityMapping().getIdentifierMapping();
// Check if the identifier is a single-column or "aggregated" composite identifier,
// otherwise it is a "non-aggregated" composite identifierView on GitHub (pinned to fad1729dce)
Solutions
- Restructure the association so its foreign key uses supported attribute kinds, or check for a newer Hibernate version implementing it.
When it happens
Trigger: Thrown when a foreign key of an unsupported kind is encountered while creating the mapping model for an association.
Common situations: See trigger scenarios.
AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22).
Data as JSON: /api/errors/b409bb05084a2383.
Report an issue: GitHub.