HHH-14827 Fix @AssociationOverride/@PrimaryKeyJoinColumn at type level being ignored when also using orm.xml

This commit is contained in:
Yoann Rodière 2021-09-16 10:51:31 +02:00
parent 70d7ac6ecd
commit 86ad83f0b5
1 changed files with 8 additions and 6 deletions

View File

@ -1794,9 +1794,10 @@ public class JPAXMLOverriddenAnnotationReader implements AnnotationReader {
}
private AssociationOverrides getAssociationOverrides(ManagedType root, XMLContext.Default defaults) {
return root instanceof JaxbEntity
? getAssociationOverrides( ( (JaxbEntity) root ).getAssociationOverride(), defaults, true )
: null;
return getAssociationOverrides(
root instanceof JaxbEntity ? ( (JaxbEntity) root ).getAssociationOverride() : Collections.emptyList(),
defaults, true
);
}
/**
@ -2742,9 +2743,10 @@ public class JPAXMLOverriddenAnnotationReader implements AnnotationReader {
}
private PrimaryKeyJoinColumns getPrimaryKeyJoinColumns(ManagedType root, XMLContext.Default defaults) {
return root instanceof JaxbEntity
? getPrimaryKeyJoinColumns( ( (JaxbEntity) root ).getPrimaryKeyJoinColumn(), defaults, true )
: null;
return getPrimaryKeyJoinColumns(
root instanceof JaxbEntity ? ( (JaxbEntity) root ).getPrimaryKeyJoinColumn() : Collections.emptyList(),
defaults, true
);
}
/**