hibernate/hibernate-orm · error · UnsupportedOperationException
Full join emulation requires a table group with selectable c
Error message
Full join emulation requires a table group with selectable columns but got: " + modelPart.getPartName()
What it means
Error "Full join emulation requires a table group with selectable columns but got: " + modelPart.getPartName()" thrown in hibernate/hibernate-orm.
Source
Thrown at hibernate-core/src/main/java/org/hibernate/sql/ast/spi/FullJoinEmulation.java:473
getValuedModelPart( tableGroup.getModelPart() ),
true );
}
private static ValuedModelPart getValuedModelPart(ModelPartContainer modelPart) {
if ( modelPart instanceof EntityMappingType mappingType ) {
return mappingType.getIdentifierMapping();
}
else if ( modelPart instanceof EntityValuedModelPart entityValuedModelPart ) {
return entityValuedModelPart.getEntityMappingType().getIdentifierMapping();
}
else if ( modelPart instanceof PluralAttributeMapping pluralAttributeMapping ) {
return pluralAttributeMapping.getKeyDescriptor();
}
else if ( modelPart instanceof ValuedModelPart directValuedModelPart ) {
return directValuedModelPart;
}
else {
throw new UnsupportedOperationException(
"Full join emulation requires a table group with selectable columns but got: "
+ modelPart.getPartName()
);
}
}
private Predicate createValuedModelPartNullnessPredicate(
TableGroup tableGroup,
ValuedModelPart valuedModelPart,
boolean negated) {
final List<ColumnReference> columnReferences = new ArrayList<>( valuedModelPart.getJdbcTypeCount() );
valuedModelPart.forEachSelectable( (selectionIndex, selectableMapping) -> {
final var tableReference = tableGroup.resolveTableReference(
tableGroup.getNavigablePath(),
valuedModelPart,
selectableMapping.getContainingTableExpression()
);
columnReferences.add( new ColumnReference( tableReference, selectableMapping ) );View on GitHub (pinned to fad1729dce)
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.
When it happens
Trigger: Full join emulation encounters a table group whose model part exposes no selectable columns.
Common situations: Full-joining a non-entity or synthetic table group; restrict full joins to entity table groups.
AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22).
Data as JSON: /api/errors/4eb64a3a37ae2761.
Report an issue: GitHub.