Skip to content

Commit

Permalink
HHH-15279 NPE with Id on OneToOne referencing entity with multi-level…
Browse files Browse the repository at this point in the history
… EmbeddedId
  • Loading branch information
dreab8 authored and beikov committed May 23, 2022
1 parent 4066fe0 commit 81d749e
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -21,6 +21,7 @@
import org.hibernate.metamodel.mapping.JdbcMapping;
import org.hibernate.metamodel.mapping.ManagedMappingType;
import org.hibernate.metamodel.mapping.ModelPart;
import org.hibernate.metamodel.mapping.PropertyBasedMapping;
import org.hibernate.metamodel.mapping.SelectableConsumer;
import org.hibernate.metamodel.mapping.SelectableMappings;
import org.hibernate.metamodel.model.domain.NavigableRole;
Expand Down Expand Up @@ -142,7 +143,9 @@ public EmbeddedAttributeMapping(
null,
inverseModelPart.getMappedFetchOptions(),
keyDeclaringType,
null,
inverseModelPart instanceof PropertyBasedMapping ?
( (PropertyBasedMapping) inverseModelPart ).getPropertyAccess() :
null,
null
);

Expand Down

0 comments on commit 81d749e

Please sign in to comment.