{"record":{"id":"1dc86d3a0ec43f2a","repo":"hibernate/hibernate-orm","slug":"unexpected-plural-attribute-element-type-s","errorCode":null,"errorMessage":"Unexpected plural-attribute element type : %s","messagePattern":"Unexpected plural-attribute element type : (.+?)","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/MappingModelCreationHelper.java","lineNumber":1530,"sourceCode":"\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow new AssertionFailure( \"Unexpected association type\" );\n\t\t\t}\n\n\t\t\tcreationProcess.registerInitializationCallback(\n\t\t\t\t\t\"PluralAttributeMapping( \" + elementDescriptor.getNavigableRole() + \") - element descriptor\",\n\t\t\t\t\t() -> elementDescriptor.finishInitialization(\n\t\t\t\t\t\t\tcollectionDescriptor,\n\t\t\t\t\t\t\tbootDescriptor,\n\t\t\t\t\t\t\telementEntityType.getRHSUniqueKeyPropertyName(),\n\t\t\t\t\t\t\tcreationProcess\n\t\t\t\t\t)\n\t\t\t);\n\n\t\t\treturn elementDescriptor;\n\t\t}\n\n\t\tthrow new UnsupportedOperationException(\n\t\t\t\t\"Unexpected plural-attribute element type : \" + element.getClass().getName()\n\t\t);\n\t}\n\n\tpublic static EmbeddedAttributeMapping createInverseModelPart(\n\t\t\tEmbeddableValuedModelPart modelPart,\n\t\t\tManagedMappingType keyDeclaringType,\n\t\t\tTableGroupProducer declaringTableGroupProducer,\n\t\t\tSelectableMappings selectableMappings,\n\t\t\tMappingModelCreationProcess creationProcess) {\n\t\tfinal var embeddableTypeDescriptor = modelPart.getEmbeddableTypeDescriptor();\n\t\tif ( modelPart instanceof NonAggregatedIdentifierMapping nonAggregatedIdentifierMapping ) {\n\t\t\treturn new InverseNonAggregatedIdentifierMapping(\n\t\t\t\t\tkeyDeclaringType,\n\t\t\t\t\tdeclaringTableGroupProducer,\n\t\t\t\t\tselectableMappings,\n\t\t\t\t\tnonAggregatedIdentifierMapping,\n\t\t\t\t\tembeddableTypeDescriptor,","sourceCodeStart":1512,"sourceCodeEnd":1548,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/MappingModelCreationHelper.java#L1512-L1548","documentation":"Error \"Unexpected plural-attribute element type : %s\" thrown in hibernate/hibernate-orm.","triggerScenarios":"Thrown when a collection's element mapping is neither basic, embeddable, entity, nor any, so no collection part can be created for it.","commonSituations":"See trigger scenarios.","solutions":["Check the collection element mapping: it must be basic, embeddable, or an entity association; fix conflicting annotations on the element."],"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"}