HHH-15865 Store attribute metadata for inverse EmbeddedAttributeMapping

This commit is contained in:
Marco Belladelli 2022-12-23 15:35:58 +01:00 committed by Christian Beikov
parent 8f7b8b8fa2
commit 90c767681e
1 changed files with 4 additions and 1 deletions

View File

@ -15,6 +15,7 @@ import org.hibernate.engine.FetchStyle;
import org.hibernate.engine.FetchTiming;
import org.hibernate.engine.spi.SharedSessionContractImplementor;
import org.hibernate.internal.util.collections.CollectionHelper;
import org.hibernate.metamodel.mapping.AttributeMapping;
import org.hibernate.metamodel.mapping.AttributeMetadata;
import org.hibernate.metamodel.mapping.EmbeddableMappingType;
import org.hibernate.metamodel.mapping.EmbeddableValuedModelPart;
@ -144,7 +145,9 @@ public class EmbeddedAttributeMapping
inverseModelPart.getFetchableName(),
-1,
inverseModelPart.getFetchableKey(),
null,
inverseModelPart instanceof AttributeMapping
? inverseModelPart.asAttributeMapping().getAttributeMetadata()
: null,
inverseModelPart.getMappedFetchOptions(),
keyDeclaringType,
inverseModelPart instanceof PropertyBasedMapping