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