Add missing hints for Hibernate @TenantId

Closes gh-32967
This commit is contained in:
Sébastien Deleuze
2024-06-06 10:04:35 +02:00
parent 61d045ce52
commit c28a0d5627

View File

@@ -219,6 +219,14 @@ class PersistenceManagedTypesBeanRegistrationAotProcessor implements BeanRegistr
ReflectionUtils.doWithMethods(managedClass, method -> registerForReflection(reflection,
AnnotationUtils.findAnnotation(method, idGeneratorTypeClass), "value"));
}
Class<? extends Annotation> attributeBinderTypeClass = loadClass("org.hibernate.annotations.AttributeBinderType", classLoader);
if (attributeBinderTypeClass != null) {
ReflectionUtils.doWithFields(managedClass, field -> registerForReflection(reflection,
AnnotationUtils.findAnnotation(field, attributeBinderTypeClass), "binder"));
ReflectionUtils.doWithMethods(managedClass, method -> registerForReflection(reflection,
AnnotationUtils.findAnnotation(method, attributeBinderTypeClass), "binder"));
}
}
@Nullable