Fix cascade loader not join associations after first collection

This commit is contained in:
Andrea Boriero 2021-10-14 11:46:17 +02:00
parent 57e2d25dd3
commit 449d4adc27
1 changed files with 6 additions and 1 deletions

View File

@ -763,7 +763,12 @@ public class LoaderSelectBuilder {
if ( cascadeStyle == null || cascadeStyle.doCascade( cascadingAction ) ) {
fetchTiming = FetchTiming.IMMEDIATE;
// In 5.x the CascadeEntityJoinWalker only join fetched the first collection fetch
joined = !hasCollectionJoinFetches;
if ( fetchable instanceof PluralAttributeMapping ) {
joined = !hasCollectionJoinFetches;
}
else {
joined = true;
}
}
}
}