diff --git a/hibernate-core/src/main/java/org/hibernate/loader/ast/internal/LoaderSelectBuilder.java b/hibernate-core/src/main/java/org/hibernate/loader/ast/internal/LoaderSelectBuilder.java index 5b2879f7da..f9c92d6bfa 100644 --- a/hibernate-core/src/main/java/org/hibernate/loader/ast/internal/LoaderSelectBuilder.java +++ b/hibernate-core/src/main/java/org/hibernate/loader/ast/internal/LoaderSelectBuilder.java @@ -415,21 +415,16 @@ public class LoaderSelectBuilder { } else if ( part instanceof ToOneAttributeMapping ) { final ToOneAttributeMapping toOneAttributeMapping = (ToOneAttributeMapping) part; - if ( toOneAttributeMapping.getSideNature() == ForeignKeyDescriptor.Nature.TARGET ) { - final TableGroupJoin tableGroupJoin = toOneAttributeMapping.createTableGroupJoin( - navigablePath, - rootTableGroup, - null, - SqlAstJoinType.LEFT, - true, - sqlAstCreationState - ); - tableGroup = tableGroupJoin.getJoinedGroup(); - sqlAstCreationState.getFromClauseAccess().registerTableGroup( navigablePath, tableGroup ); - } - else { - tableGroup = rootTableGroup; - } + final TableGroupJoin tableGroupJoin = toOneAttributeMapping.createTableGroupJoin( + navigablePath, + rootTableGroup, + null, + SqlAstJoinType.LEFT, + true, + sqlAstCreationState + ); + tableGroup = tableGroupJoin.getJoinedGroup(); + sqlAstCreationState.getFromClauseAccess().registerTableGroup( navigablePath, tableGroup ); } else { tableGroup = rootTableGroup;