{"record":{"id":"53bf4c8e78b7683f","repo":"hibernate/hibernate-orm","slug":"error-transforming-many-to-one","errorCode":null,"errorMessage":"Error transforming <many-to-one/> : {}","messagePattern":"Error transforming <many-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":2191,"sourceCode":"\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}\n\t\t\t}\n\t\t\telse if ( hbmAttributeMapping instanceof PluralAttributeInfo hbmCollection ) {\n\t\t\t\tfinal var propertyInfo = managedTypeInfo.propertyInfoMap().get( hbmCollection.getName() );\n\t\t\t\tif ( hbmCollection.getElement() != null || hbmCollection.getCompositeElement() != null ) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tattributes.getElementCollectionAttributes().add( transformElementCollection( roleBase, hbmCollection, propertyInfo ) );\n\t\t\t\t\t}\n\t\t\t\t\tcatch (Exception e) {","sourceCodeStart":2173,"sourceCodeEnd":2209,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/boot/jaxb/hbm/transform/HbmXmlTransformer.java#L2173-L2209","documentation":"Error \"Error transforming <many-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 <many-to-one/> element attributes (class, column, not-null, fetch) for correctness.","Verify the referenced target entity class is mapped and the column names are valid.","Review the causal exception to pinpoint the failing attribute."],"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"}