{"record":{"id":"4eb64a3a37ae2761","repo":"hibernate/hibernate-orm","slug":"full-join-emulation-requires-a-table-group-with-se","errorCode":null,"errorMessage":"Full join emulation requires a table group with selectable columns but got: \" + modelPart.getPartName()","messagePattern":"Full join emulation requires a table group with selectable columns but got: \" \\+ modelPart\\.getPartName\\(\\)","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/sql/ast/spi/FullJoinEmulation.java","lineNumber":473,"sourceCode":"\t\t\t\tgetValuedModelPart( tableGroup.getModelPart() ),\n\t\t\t\ttrue );\n\t}\n\n\tprivate static ValuedModelPart getValuedModelPart(ModelPartContainer modelPart) {\n\t\tif ( modelPart instanceof EntityMappingType mappingType ) {\n\t\t\treturn mappingType.getIdentifierMapping();\n\t\t}\n\t\telse if ( modelPart instanceof EntityValuedModelPart entityValuedModelPart ) {\n\t\t\treturn entityValuedModelPart.getEntityMappingType().getIdentifierMapping();\n\t\t}\n\t\telse if ( modelPart instanceof PluralAttributeMapping pluralAttributeMapping ) {\n\t\t\treturn pluralAttributeMapping.getKeyDescriptor();\n\t\t}\n\t\telse if ( modelPart instanceof ValuedModelPart directValuedModelPart ) {\n\t\t\treturn directValuedModelPart;\n\t\t}\n\t\telse {\n\t\t\tthrow new UnsupportedOperationException(\n\t\t\t\t\t\"Full join emulation requires a table group with selectable columns but got: \"\n\t\t\t\t\t+ modelPart.getPartName()\n\t\t\t);\n\t\t}\n\t}\n\n\tprivate Predicate createValuedModelPartNullnessPredicate(\n\t\t\tTableGroup tableGroup,\n\t\t\tValuedModelPart valuedModelPart,\n\t\t\tboolean negated) {\n\t\tfinal List<ColumnReference> columnReferences = new ArrayList<>( valuedModelPart.getJdbcTypeCount() );\n\t\tvaluedModelPart.forEachSelectable( (selectionIndex, selectableMapping) -> {\n\t\t\tfinal var tableReference = tableGroup.resolveTableReference(\n\t\t\t\t\ttableGroup.getNavigablePath(),\n\t\t\t\t\tvaluedModelPart,\n\t\t\t\t\tselectableMapping.getContainingTableExpression()\n\t\t\t);\n\t\t\tcolumnReferences.add( new ColumnReference( tableReference, selectableMapping ) );","sourceCodeStart":455,"sourceCodeEnd":491,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/sql/ast/spi/FullJoinEmulation.java#L455-L491","documentation":"AssertionFailedException in getValuedModelPart: the model part carried by the table group resolved to no valued part with selectable columns (no identifier/key descriptor), which full-join nullness emulation needs.","triggerScenarios":"Full join emulation encounters a table group whose model part exposes no selectable columns.","commonSituations":"Full-joining a non-entity or synthetic table group; restrict full joins to entity table groups.","solutions":["Make sure the full join operates on a table group whose model part exposes selectable columns (an entity or root table group).","Restructure the query so the full join target is an entity root, not an anonymous or derived table group without selectable columns.","Check the FROM clause construction: the full join must reference a mappable entity rather than a computed subquery part."],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fad1729dce015f908198d57a8d80274a30f905a5","analyzedAt":"2026-08-22T04:13:57.527Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}