{"record":{"id":"b409bb05084a2383","repo":"hibernate/hibernate-orm","slug":"support-for-s-foreign-keys-not-yet-implemented-b409bb","errorCode":null,"errorMessage":"Support for %s foreign-keys not yet implemented: %s -> %s","messagePattern":"Support for (.+?) foreign-keys not yet implemented: (.+?) -> (.+?)","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/MappingModelCreationHelper.java","lineNumber":1017,"sourceCode":"\t\t\tfinal var value = bootProperty.getValue();\n\t\t\tfinal var embeddedForeignKeyDescriptor = buildEmbeddableForeignKeyDescriptor(\n\t\t\t\t\tgetPropertyPath( attributeMapping.getNavigableRole() ),\n\t\t\t\t\tembeddableValuedModelPart,\n\t\t\t\t\tbootValueMapping,\n\t\t\t\t\tattributeMapping.getDeclaringType(),\n\t\t\t\t\tattributeMapping.findContainingEntityMapping(),\n\t\t\t\t\tnull,\n\t\t\t\t\tswapDirection,\n\t\t\t\t\tvalue.getColumnInsertability(),\n\t\t\t\t\tvalue.getColumnUpdateability(),\n\t\t\t\t\tcreationProcess\n\t\t\t);\n\t\t\tattributeMapping.setForeignKeyDescriptor( embeddedForeignKeyDescriptor );\n\t\t\tattributeMapping.setupCircularFetchModelPart( creationProcess );\n//\t\t\tcreationProcess.registerForeignKey( attributeMapping, embeddedForeignKeyDescriptor );\n\t\t}\n\t\telse {\n\t\t\tthrow new UnsupportedOperationException(\n\t\t\t\t\t\"Support for \" + fkTarget.getClass() + \" foreign-keys not yet implemented: \" +\n\t\t\t\t\t\t\tbootProperty.getPersistentClass().getEntityName() + \" -> \" + bootProperty.getName()\n\t\t\t);\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tprivate static PropertyAccess getDeclaringKeyPropertyAccess(\n\t\t\tToOneAttributeMapping attributeMapping,\n\t\t\tToOne bootValueMapping,\n\t\t\tPropertyAccess inversePropertyAccess,\n\t\t\tPropertyBasedMapping simpleFkTarget) {\n\t\tif ( inversePropertyAccess == null ) {\n\t\t\tif ( bootValueMapping instanceof OneToOne ) {\n\t\t\t\tfinal var identifierMapping = attributeMapping.findContainingEntityMapping().getIdentifierMapping();\n\t\t\t\t// Check if the identifier is a single-column or \"aggregated\" composite identifier,\n\t\t\t\t// otherwise it is a \"non-aggregated\" composite identifier","sourceCodeStart":999,"sourceCodeEnd":1035,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/MappingModelCreationHelper.java#L999-L1035","documentation":"Error \"Support for %s foreign-keys not yet implemented: %s -> %s\" thrown in hibernate/hibernate-orm.","triggerScenarios":"Thrown when a foreign key of an unsupported kind is encountered while creating the mapping model for an association.","commonSituations":"See trigger scenarios.","solutions":["Restructure the association so its foreign key uses supported attribute kinds, or check for a newer Hibernate version implementing it."],"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"}