Package org.hibernate.annotations
Annotation Type AnyDiscriminator
-
@Target({METHOD,FIELD,ANNOTATION_TYPE}) @Retention(RUNTIME) public @interface AnyDiscriminator
A simplified way to specify the type of the discriminator in anAnymapping, using the JPA-definedDiscriminatorType. This annotation must be used in combination withColumnto fully describe the discriminator column for an@Anyrelationship.@AnyDiscriminatoris quite similar toDiscriminatorColumn.discriminatorType()in single-table inheritance mappings, but it describes a discriminator held along with the foreign key in the referring side of a discriminated relationship.This annotation may be used in conjunction with
JdbcTypeorJdbcTypeCodeto more precisely specify the type mapping. On the other hand,JdbcTypeorJdbcTypeCodemay be used without@AnyDiscriminator.- Since:
- 6.0
- See Also:
Any
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description DiscriminatorTypevalueThe type of the discriminator, as a JPADiscriminatorType.
-
-
-
Element Detail
-
value
DiscriminatorType value
The type of the discriminator, as a JPADiscriminatorType. For more precise specification of the type, useJdbcTypeorJdbcTypeCode.- Default:
- jakarta.persistence.DiscriminatorType.STRING
-
-