{"record":{"id":"cefe1ced74fefac8","repo":"hibernate/hibernate-orm","slug":"error-transforming-one-to-one","errorCode":null,"errorMessage":"Error transforming <one-to-one/> : {}","messagePattern":"Error transforming <one-to-one/> : (.+?)","errorType":"exception","errorClass":"TransformationException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/boot/jaxb/hbm/transform/HbmXmlTransformer.java","lineNumber":2183,"sourceCode":"\t\t\t\t// }\n\t\t\t\t//\n\t\t\t\t// where the `name` could then be used for `@PropertyRef`\n\t\t\t\thandleUnsupported( \"<properties/> mappings not supported for transformation [name=%s]\", hbmProperties.getName() );\n\t\t\t}\n\t\t\telse if ( hbmAttributeMapping instanceof JaxbHbmDynamicComponentType dynamicComponentType) {\n\t\t\t\tfinal String name = dynamicComponentType.getName();\n\t\t\t\thandleUnsupported(\n\t\t\t\t\t\t\"<dynamic-component/> mappings not supported for transformation [name=%s]\",\n\t\t\t\t\t\tname\n\t\t\t\t);\n\t\t\t}\n\t\t\telse if ( hbmAttributeMapping instanceof JaxbHbmOneToOneType hbmOneToOne ) {\n\t\t\t\ttry {\n\t\t\t\t\tfinal var propertyInfo = managedTypeInfo.propertyInfoMap().get( hbmOneToOne.getName() );\n\t\t\t\t\ttransferOneToOne( hbmOneToOne, propertyInfo, attributes );\n\t\t\t\t}\n\t\t\t\tcatch (Exception e) {\n\t\t\t\t\tthrow new TransformationException( \"Error transforming <one-to-one/> : \" + hbmOneToOne.getName(), e, origin() );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if ( hbmAttributeMapping instanceof JaxbHbmManyToOneType hbmManyToOne ) {\n\t\t\t\ttry {\n\t\t\t\t\ttransferManyToOne( managedTypeInfo, attributes, hbmManyToOne );\n\t\t\t\t}\n\t\t\t\tcatch (Exception e) {\n\t\t\t\t\tthrow new TransformationException( \"Error transforming <many-to-one/> : \" + hbmManyToOne.getName(), e, origin() );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if ( hbmAttributeMapping instanceof JaxbHbmAnyAssociationType any ) {\n\t\t\t\ttry {\n\t\t\t\t\tfinal var propertyInfo = managedTypeInfo.propertyInfoMap().get( any.getName() );\n\t\t\t\t\tattributes.getAnyMappingAttributes().add( transformAnyAttribute( any, propertyInfo ) );\n\t\t\t\t}\n\t\t\t\tcatch (Exception e) {\n\t\t\t\t\tthrow new TransformationException( \"Error transforming <any/> : \" + any.getName(), e, origin() );\n\t\t\t\t}","sourceCodeStart":2165,"sourceCodeEnd":2201,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/boot/jaxb/hbm/transform/HbmXmlTransformer.java#L2165-L2201","documentation":"Error \"Error transforming <one-to-one/> : {}\" thrown in hibernate/hibernate-orm.","triggerScenarios":"The hbm.xml to mapping.xml transformer hits an unexpected structure.","commonSituations":"Converting legacy hbm.xml documents containing constructs the transformer does not handle.","solutions":["Check the <one-to-one/> element attributes (class, property-ref, constrained) for correctness.","Verify the referenced entity and property exist and are mapped.","Inspect the causal exception for the exact failure during transformation."],"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"}