HHH-16209 Identically-named association in entity root and embeddable leads to mixup during association loading
This commit is contained in:
parent
fd7b599d6b
commit
04ce594959
|
@ -1068,7 +1068,10 @@ public class ToOneAttributeMapping
|
|||
|
||||
NavigablePath navigablePath = parentNavigablePath.trimSuffix( bidirectionalAttributePath );
|
||||
if ( navigablePath != null ) {
|
||||
if ( navigablePath.getLocalName().equals( EntityIdentifierMapping.ROLE_LOCAL_NAME ) ) {
|
||||
final String localName = navigablePath.getLocalName();
|
||||
if ( localName.equals( EntityIdentifierMapping.ROLE_LOCAL_NAME )
|
||||
|| localName.equals( ForeignKeyDescriptor.PART_NAME )
|
||||
|| localName.equals( ForeignKeyDescriptor.TARGET_PART_NAME ) ) {
|
||||
navigablePath = navigablePath.getParent();
|
||||
}
|
||||
return creationState.resolveModelPart( navigablePath ).getPartMappingType() == entityMappingType;
|
||||
|
|
Loading…
Reference in New Issue