use of jakarta.persistence.InheritanceType in project hibernate-orm by hibernate.
the class JPAXMLOverriddenAnnotationReader method getInheritance.
private Inheritance getInheritance(ManagedType root, XMLContext.Default defaults) {
JaxbInheritance element = root instanceof JaxbEntity ? ((JaxbEntity) root).getInheritance() : null;
if (element != null) {
AnnotationDescriptor ad = new AnnotationDescriptor(Inheritance.class);
InheritanceType strategy = element.getStrategy();
if (strategy != null) {
ad.setValue("strategy", strategy);
}
return AnnotationFactory.create(ad);
} else if (defaults.canUseJavaAnnotations()) {
return getPhysicalAnnotation(Inheritance.class);
} else {
return null;
}
}
Aggregations