{"record":{"id":"775a79e3ed546da0","repo":"hibernate/hibernate-orm","slug":"assumed-dynamic-entity-did-not-define-entity-name","errorCode":null,"errorMessage":"Assumed dynamic entity did not define entity-name","messagePattern":"Assumed dynamic entity did not define entity-name","errorType":"exception","errorClass":"ModelsException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/boot/models/xml/internal/ManagedTypeProcessor.java","lineNumber":92,"sourceCode":"\t// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\t// Entity\n\n\tpublic static void processCompleteEntity(\n\t\t\tJaxbEntityMappingsImpl jaxbRoot,\n\t\t\tJaxbEntityImpl jaxbEntity,\n\t\t\tXmlDocumentContext xmlDocumentContext) {\n\t\tfinal MutableClassDetails classDetails;\n\t\tfinal AccessType classAccessType;\n\t\tfinal AttributeProcessor.MemberAdjuster memberAdjuster;\n\n\t\tfinal var classDetailsRegistry =\n\t\t\t\txmlDocumentContext.getModelBuildingContext()\n\t\t\t\t\t\t.getClassDetailsRegistry();\n\n\t\tif ( isEmpty( jaxbEntity.getClazz() ) ) {\n\t\t\t// no class == dynamic\n\t\t\tif ( isEmpty( jaxbEntity.getName() ) ) {\n\t\t\t\tthrow new ModelsException( \"Assumed dynamic entity did not define entity-name\" );\n\t\t\t}\n\n\t\t\tmemberAdjuster = ManagedTypeProcessor::adjustDynamicTypeMember;\n\t\t\tclassAccessType = AccessType.FIELD;\n\t\t\tclassDetails = (MutableClassDetails) ModelsHelper.resolveClassDetails(\n\t\t\t\t\tjaxbEntity.getName(),\n\t\t\t\t\txmlDocumentContext,\n\t\t\t\t\tclassDetailsRegistry,\n\t\t\t\t\t() -> {\n\t\t\t\t\t\tfinal ClassDetails superClass;\n\t\t\t\t\t\tfinal TypeDetails superType;\n\t\t\t\t\t\tif ( isEmpty( jaxbEntity.getExtends() ) ) {\n\t\t\t\t\t\t\tsuperClass = null;\n\t\t\t\t\t\t\tsuperType = null;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t// we expect the super to have been processed first.\n\t\t\t\t\t\t\t// not worth the effort to support the delay","sourceCodeStart":74,"sourceCodeEnd":110,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/boot/models/xml/internal/ManagedTypeProcessor.java#L74-L110","documentation":"Error \"Assumed dynamic entity did not define entity-name\" thrown in hibernate/hibernate-orm.","triggerScenarios":"An hbm.xml / orm.xml mapping document violates a mapping rule during bootstrap.","commonSituations":"Legacy XML mappings with invalid combinations (column+formula, mixed inheritance, missing identifiers, bad extends references).","solutions":["Set the entity-name attribute on the <entity/> element in the XML mapping for the dynamic entity."],"exampleFix":"Set the entity-name attribute on the <entity/> element in the XML mapping for the dynamic entity.","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"}