{"record":{"id":"6ff3721973f9fc8e","repo":"hibernate/hibernate-orm","slug":"not-yet-implemented","errorCode":null,"errorMessage":"Not yet implemented","messagePattern":"Not yet implemented","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/boot/jaxb/hbm/transform/HbmXmlTransformer.java","lineNumber":3660,"sourceCode":"\t\t}\n\t\tif ( hbmCollection.getSqlDeleteAll() != null ) {\n\t\t\tfinal var jaxbCustomSql = new JaxbCustomSqlImpl();\n\t\t\ttarget.setSqlDeleteAll( jaxbCustomSql );\n\t\t\ttransferCustomSql( hbmCollection.getSqlDeleteAll(), jaxbCustomSql );\n\t\t}\n\t}\n\n\tprivate JaxbPluralAnyMappingImpl transformPluralAny(PluralAttributeInfo hbmCollection) {\n\t\tfinal var target = new JaxbPluralAnyMappingImpl();\n\t\ttransferPluralAny( hbmCollection, hbmCollection.getManyToAny(), target );\n\t\treturn target;\n\t}\n\n\tprivate void transferPluralAny(\n\t\t\tPluralAttributeInfo hbmCollection,\n\t\t\tJaxbHbmManyToAnyCollectionElementType manyToAny,\n\t\t\tJaxbPluralAnyMappingImpl target) {\n\t\tthrow new UnsupportedOperationException( \"Not yet implemented\" );\n\t}\n\n\tprivate void transferIdentifier(\n\t\t\tJaxbHbmRootEntityType hbmEntity,\n\t\t\tJaxbEntityImpl mappingXmlEntity,\n\t\t\tEntityTypeInfo bootEntityInfo,\n\t\t\tRootClass rootClass) {\n\t\tfinal var identifierProperty = rootClass.getIdentifierProperty();\n\t\tif ( identifierProperty != null ) {\n\t\t\t// we have either a simple id or an embedded id\n\t\t\ttransferSinglePropertyIdentifier( hbmEntity, mappingXmlEntity, bootEntityInfo, rootClass, identifierProperty );\n\t\t}\n\t\telse {\n\t\t\ttransferNonAggregatedCompositeId( hbmEntity, mappingXmlEntity, bootEntityInfo, rootClass );\n\t\t}\n\t}\n\n\tprivate void transferSinglePropertyIdentifier(","sourceCodeStart":3642,"sourceCodeEnd":3678,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/boot/jaxb/hbm/transform/HbmXmlTransformer.java#L3642-L3678","documentation":"transferPluralAny unconditionally throws UnsupportedOperationException('Not yet implemented'): Hibernate 6's hbm-to-mapping.xml transformer has no implementation for plural <any/> mappings (<many-to-any>). This is a hard feature gap, not a runtime condition - it fires 100% of the time a many-to-any collection is transformed, and is usually observed wrapped by error 363.","triggerScenarios":"Any transformation of a collection whose body is <many-to-any ...> with <meta-value> children. No configuration change avoids it while the element remains.","commonSituations":"Polymorphic legacy associations (any entity can be referenced via discriminator + id); bulk migration tools hitting the first unsupported construct in an old codebase.","solutions":["Do not run the transformer over mappings containing <many-to-any>; bind those files natively as hbm.xml","Hand-author the equivalent in mapping.xml for that collection","Remodel: introduce an association entity with an explicit type discriminator column and a normal one-to-many/many-to-many","Track/upvote the Hibernate JIRA issue for plural-any transformation support before relying on it"],"exampleFix":"// before\nmetadataSources.addFile(\"polymorphic.hbm.xml\"); // contains <many-to-any>\ntransformer.transform(...); // UnsupportedOperationException: Not yet implemented\n\n// after: keep hbm.xml for that unit, transform the rest\nmetadataSources.addFile(\"polymorphic.hbm.xml\"); // native hbm binding, no transformation","handlingStrategy":"validation","validationCode":"// refuse to transform files containing many-to-any - fail fast with a clear message\nboolean hasPluralAny = doc.getElementsByTagName(\"many-to-any\").getLength() > 0;\nif (hasPluralAny) {\n    skipTransformationAndBindNatively(hbmFile); // hbm.xml remains directly bindable\n}","typeGuard":null,"tryCatchPattern":"try {\n    transformer.transform(hbmSource);\n} catch (TransformationException e) {\n    if (e.getCause() instanceof UnsupportedOperationException\n            && e.getCause().getMessage().contains(\"Not yet implemented\")) {\n        metadataSources.addFile(hbmPath); // native hbm binding fallback for this unit\n    } else { throw e; }\n}","preventionTips":["Treat many-to-any as a known untransformable construct during migration planning","Maintain an explicit exclusion list of files that stay on hbm.xml","Prefer remodeling polymorphic collections with discriminator entities in new mappings"],"tags":["hibernate","hbm-xml","many-to-any","not-implemented","mapping-transformation"],"backgroundTag":"unsupported-orm-mapping-feature","analyzedSha":"fad1729dce015f908198d57a8d80274a30f905a5","analyzedAt":"2026-08-22T04:13:57.527Z","schemaVersion":2},"datasetVersion":"2026-08-22T09:17:25.309Z"}