HHH-16871 Simplified maximum fetch depth condition

This commit is contained in:
Marco Belladelli 2023-07-10 16:04:49 +02:00
parent 65c1d2db2b
commit 899bf1efa5
1 changed files with 2 additions and 1 deletions

View File

@ -942,8 +942,9 @@ public class LoaderSelectBuilder {
joined = false; joined = false;
} }
else if ( fetchDepth > maximumFetchDepth + 1 ) { else if ( fetchDepth > maximumFetchDepth + 1 ) {
// We can preserve the existing value of joined for basic and embedded values
if ( !( fetchable instanceof BasicValuedModelPart ) && !( fetchable instanceof EmbeddedAttributeMapping ) ) { if ( !( fetchable instanceof BasicValuedModelPart ) && !( fetchable instanceof EmbeddedAttributeMapping ) ) {
return; joined = false;
} }
} }
} }