HHH-17224 Respect association fetch style for dynamic results
This commit is contained in:
parent
c29869ec7b
commit
50a83ba953
|
@ -1890,10 +1890,9 @@ public abstract class AbstractEntityPersister
|
|||
final Fetchable fetchable = fetchableContainer.getFetchable( i );
|
||||
// Ignore plural attributes
|
||||
if ( !( fetchable instanceof PluralAttributeMapping ) ) {
|
||||
final FetchTiming fetchTiming;
|
||||
final FetchTiming fetchTiming = fetchable.getMappedFetchOptions().getTiming();
|
||||
if ( fetchable instanceof BasicValuedModelPart ) {
|
||||
// Ignore lazy basic columns
|
||||
fetchTiming = fetchable.getMappedFetchOptions().getTiming();
|
||||
if ( fetchTiming == FetchTiming.DELAYED ) {
|
||||
continue;
|
||||
}
|
||||
|
@ -1908,10 +1907,6 @@ public abstract class AbstractEntityPersister
|
|||
if ( !getRootTableName().equals( association.getForeignKeyDescriptor().getKeyTable() ) ) {
|
||||
continue;
|
||||
}
|
||||
fetchTiming = FetchTiming.DELAYED;
|
||||
}
|
||||
else {
|
||||
fetchTiming = fetchable.getMappedFetchOptions().getTiming();
|
||||
}
|
||||
|
||||
if ( fetchTiming == null ) {
|
||||
|
@ -1923,7 +1918,7 @@ public abstract class AbstractEntityPersister
|
|||
fetchable,
|
||||
fetchParent.resolveNavigablePath( fetchable ),
|
||||
fetchTiming,
|
||||
true,
|
||||
false,
|
||||
null,
|
||||
creationState
|
||||
);
|
||||
|
|
|
@ -142,7 +142,7 @@ public class DynamicFetchBuilderStandard
|
|||
return parent.generateFetchableFetch(
|
||||
attributeMapping,
|
||||
fetchPath,
|
||||
FetchTiming.DELAYED,
|
||||
attributeMapping.getMappedFetchOptions().getTiming(),
|
||||
false,
|
||||
null,
|
||||
creationStateImpl
|
||||
|
@ -165,7 +165,7 @@ public class DynamicFetchBuilderStandard
|
|||
return parent.generateFetchableFetch(
|
||||
attributeMapping,
|
||||
fetchPath,
|
||||
FetchTiming.DELAYED,
|
||||
attributeMapping.getMappedFetchOptions().getTiming(),
|
||||
false,
|
||||
null,
|
||||
creationStateImpl
|
||||
|
|
Loading…
Reference in New Issue