{"record":{"id":"afa813fe31bdc48f","repo":"hibernate/hibernate-orm","slug":"unexpected-collectionclassification-s","errorCode":null,"errorMessage":"Unexpected CollectionClassification : %s","messagePattern":"Unexpected CollectionClassification : (.+?)","errorType":"exception","errorClass":"MappingException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/MappingModelCreationHelper.java","lineNumber":607,"sourceCode":"\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase SET:\n\t\t\tcase ORDERED_SET:\n\t\t\tcase SORTED_SET: {\n\t\t\t\tfinal var setJavaType =\n\t\t\t\t\t\tcollectionSemantics.getCollectionClassification() == CollectionClassification.SORTED_MAP\n\t\t\t\t\t\t\t\t? SortedSet.class\n\t\t\t\t\t\t\t\t: java.util.Set.class;\n\t\t\t\tcollectionMappingType = new CollectionMappingTypeImpl<>(\n\t\t\t\t\t\tjtdRegistry.getDescriptor( setJavaType ),\n\t\t\t\t\t\tcollectionSemantics\n\t\t\t\t);\n\n\t\t\t\tindexDescriptor = null;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tdefault: {\n\t\t\t\tthrow new MappingException(\n\t\t\t\t\t\t\"Unexpected CollectionClassification : \" + collectionSemantics.getCollectionClassification()\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tfinal var attributeMetadata = new SimpleAttributeMetadata(\n\t\t\t\tpropertyAccess,\n\t\t\t\tImmutableMutabilityPlan.instance(),\n\t\t\t\tbootProperty.isOptional(),\n\t\t\t\tbootProperty.isInsertable(),\n\t\t\t\tbootProperty.isUpdatable(),\n\t\t\t\tbootProperty.isOptimisticLocked(),\n\t\t\t\tbootProperty.isSelectable(),\n\t\t\t\tcascadeStyle\n\t\t);\n\n\t\tfinal var sessionFactory = creationContext.getSessionFactory();\n\t\tfinal var collectionType = collectionDescriptor.getCollectionType();","sourceCodeStart":589,"sourceCodeEnd":625,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/MappingModelCreationHelper.java#L589-L625","documentation":"Error \"Unexpected CollectionClassification : %s\" thrown in hibernate/hibernate-orm.","triggerScenarios":"Thrown when mapping model creation encounters a CollectionClassification enum value it does not handle.","commonSituations":"See trigger scenarios.","solutions":["Use a supported collection classification (BAG, ID_BAG, LIST, SET, MAP, ARRAY) for the collection mapping."],"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"}