{"record":{"id":"713eafc797c0ec7c","repo":"hibernate/hibernate-orm","slug":"attributecontainer-classname-does-not-support","errorCode":null,"errorMessage":"AttributeContainer [${className}] does not support identifiers","messagePattern":"AttributeContainer \\[(.+?)\\] does not support identifiers","errorType":"exception","errorClass":"UnsupportedMappingException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/AttributeContainer.java","lineNumber":32,"sourceCode":"\n/**\n * @author Steve Ebersole\n */\npublic interface AttributeContainer<J> extends ManagedDomainType<J> {\n\tInFlightAccess<J> getInFlightAccess();\n\n\t/**\n\t * Used during creation of the type\n\t */\n\tinterface InFlightAccess<J> {\n\t\tvoid addAttribute(PersistentAttribute<J,?> attribute);\n\n\t\t/**\n\t\t * Callback used when we have a singular id attribute of some form - either a simple id\n\t\t * or an aggregated composite id ({@link jakarta.persistence.EmbeddedId})\n\t\t */\n\t\tdefault void applyIdAttribute(SingularPersistentAttribute<J, ?> idAttribute) {\n\t\t\tthrow new UnsupportedMappingException(\n\t\t\t\t\t\"AttributeContainer [\" + getClass().getName() + \"] does not support identifiers\"\n\t\t\t);\n\t\t}\n\n\t\tdefault void applyNonAggregatedIdAttributes(\n\t\t\t\tSet<? extends SingularPersistentAttribute<? super J, ?>> idAttributes,\n\t\t\t\tEmbeddableDomainType<?> idClassType) {\n\t\t\tthrow new UnsupportedMappingException(\n\t\t\t\t\t\"AttributeContainer [\" + getClass().getName() + \"] does not support identifiers\"\n\t\t\t);\n\t\t}\n\n\t\t/**\n\t\t * todo (6.0) : we still need to implement this properly and the contract may change\n\t\t * \t\t- specifically I am not certain we will be able to re-use `SingularPersistentAttribute`\n\t\t * \t\tbecause of its dependence on declaring-type, etc that we may not be able to do\n\t\t */\n\t\tdefault void applyIdClassAttributes(Set<SingularPersistentAttribute<? super J, ?>> idClassAttributes) {","sourceCodeStart":14,"sourceCodeEnd":50,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/AttributeContainer.java#L14-L50","documentation":"Error \"AttributeContainer [${className}] does not support identifiers\" thrown in hibernate/hibernate-orm.","triggerScenarios":"Thrown when identifier access is requested from an attribute container that is not an identifiable type (e.g. a basic or embeddable container).","commonSituations":"See trigger scenarios.","solutions":["Use an entity type instead of a mapped superclass/embeddable container when identifier access is needed."],"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"}