HHH-16938 Fix meta-annotations support for any discriminators
This commit is contained in:
parent
aa2cfe8a17
commit
f69de54360
|
@ -66,6 +66,7 @@ import jakarta.persistence.ManyToOne;
|
||||||
import jakarta.persistence.OneToOne;
|
import jakarta.persistence.OneToOne;
|
||||||
|
|
||||||
import static org.hibernate.boot.model.internal.AnnotatedColumn.buildColumnOrFormulaFromAnnotation;
|
import static org.hibernate.boot.model.internal.AnnotatedColumn.buildColumnOrFormulaFromAnnotation;
|
||||||
|
import static org.hibernate.boot.model.internal.HCANNHelper.findAnnotation;
|
||||||
import static org.hibernate.internal.util.StringHelper.isEmpty;
|
import static org.hibernate.internal.util.StringHelper.isEmpty;
|
||||||
import static org.hibernate.internal.util.StringHelper.isNotEmpty;
|
import static org.hibernate.internal.util.StringHelper.isNotEmpty;
|
||||||
import static org.hibernate.internal.util.StringHelper.qualify;
|
import static org.hibernate.internal.util.StringHelper.qualify;
|
||||||
|
@ -814,13 +815,13 @@ public class BinderHelper {
|
||||||
private static void processAnyDiscriminatorValues(
|
private static void processAnyDiscriminatorValues(
|
||||||
XProperty property,
|
XProperty property,
|
||||||
Consumer<AnyDiscriminatorValue> consumer) {
|
Consumer<AnyDiscriminatorValue> consumer) {
|
||||||
final AnyDiscriminatorValue valueAnn = property.getAnnotation( AnyDiscriminatorValue.class );
|
final AnyDiscriminatorValue valueAnn = findAnnotation( property, AnyDiscriminatorValue.class );
|
||||||
if ( valueAnn != null ) {
|
if ( valueAnn != null ) {
|
||||||
consumer.accept( valueAnn );
|
consumer.accept( valueAnn );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final AnyDiscriminatorValues valuesAnn = property.getAnnotation( AnyDiscriminatorValues.class );
|
final AnyDiscriminatorValues valuesAnn = findAnnotation( property, AnyDiscriminatorValues.class );
|
||||||
if ( valuesAnn != null ) {
|
if ( valuesAnn != null ) {
|
||||||
for ( AnyDiscriminatorValue discriminatorValue : valuesAnn.value() ) {
|
for ( AnyDiscriminatorValue discriminatorValue : valuesAnn.value() ) {
|
||||||
consumer.accept( discriminatorValue );
|
consumer.accept( discriminatorValue );
|
||||||
|
|
Loading…
Reference in New Issue