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