Restore collectionsInDefaultFetchGroupEnabled usage in LazyAttributesMetadata
This commit is contained in:
parent
7dd49e425e
commit
41f44ad2a1
|
@ -34,7 +34,8 @@ public class LazyAttributesMetadata implements Serializable {
|
|||
public static LazyAttributesMetadata from(
|
||||
PersistentClass mappedEntity,
|
||||
boolean isEnhanced,
|
||||
boolean allowEnhancementAsProxy) {
|
||||
boolean allowEnhancementAsProxy,
|
||||
boolean collectionsInDefaultFetchGroupEnabled) {
|
||||
final Map<String, LazyAttributeDescriptor> lazyAttributeDescriptorMap = new LinkedHashMap<>();
|
||||
final Map<String, Set<String>> fetchGroupToAttributesMap = new HashMap<>();
|
||||
|
||||
|
@ -48,7 +49,7 @@ public class LazyAttributesMetadata implements Serializable {
|
|||
property,
|
||||
isEnhanced,
|
||||
allowEnhancementAsProxy,
|
||||
false
|
||||
collectionsInDefaultFetchGroupEnabled
|
||||
);
|
||||
if ( lazy ) {
|
||||
final LazyAttributeDescriptor lazyAttributeDescriptor = LazyAttributeDescriptor.from( property, i, x++ );
|
||||
|
|
|
@ -38,11 +38,12 @@ public final class BytecodeEnhancementMetadataPojoImpl implements BytecodeEnhanc
|
|||
PersistentClass persistentClass,
|
||||
Set<String> identifierAttributeNames,
|
||||
CompositeType nonAggregatedCidMapper,
|
||||
boolean allowEnhancementAsProxy) {
|
||||
boolean allowEnhancementAsProxy,
|
||||
boolean collectionsInDefaultFetchGroupEnabled) {
|
||||
final Class mappedClass = persistentClass.getMappedClass();
|
||||
final boolean enhancedForLazyLoading = PersistentAttributeInterceptable.class.isAssignableFrom( mappedClass );
|
||||
final LazyAttributesMetadata lazyAttributesMetadata = enhancedForLazyLoading
|
||||
? LazyAttributesMetadata.from( persistentClass, true, allowEnhancementAsProxy )
|
||||
? LazyAttributesMetadata.from( persistentClass, true, allowEnhancementAsProxy, collectionsInDefaultFetchGroupEnabled )
|
||||
: LazyAttributesMetadata.nonEnhanced( persistentClass.getEntityName() );
|
||||
|
||||
return new BytecodeEnhancementMetadataPojoImpl(
|
||||
|
|
|
@ -169,7 +169,8 @@ public class EntityMetamodel implements Serializable {
|
|||
persistentClass,
|
||||
idAttributeNames,
|
||||
nonAggregatedCidMapper,
|
||||
sessionFactoryOptions.isEnhancementAsProxyEnabled()
|
||||
sessionFactoryOptions.isEnhancementAsProxyEnabled(),
|
||||
sessionFactoryOptions.isCollectionsInDefaultFetchGroupEnabled()
|
||||
);
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Reference in New Issue