allow @Nationalized to be used as a meta-annotation

This commit is contained in:
Gavin 2022-12-31 17:22:43 +01:00
parent 6523599106
commit 5bc6558b07
2 changed files with 3 additions and 2 deletions

View File

@ -11,6 +11,7 @@ import java.lang.annotation.Target;
import org.hibernate.dialect.Dialect;
import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
@ -38,7 +39,7 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
*
* @author Steve Ebersole
*/
@Target( { METHOD, FIELD } )
@Target( { METHOD, FIELD, ANNOTATION_TYPE } )
@Retention( RUNTIME )
public @interface Nationalized {
}

View File

@ -341,7 +341,7 @@ public class BasicValueBinder implements JdbcTypeIndicators {
}
if ( getDialect().getNationalizationSupport() == NationalizationSupport.EXPLICIT ) {
isNationalized = modelXProperty.isAnnotationPresent( Nationalized.class )
isNationalized = HCANNHelper.findAnnotation( modelXProperty, Nationalized.class ) != null
|| buildingContext.getBuildingOptions().useNationalizedCharacterData();
}