Package org.hibernate.annotations
Annotation Interface DiscriminatorOptions
Optional annotation used in conjunction with the JPA-defined
DiscriminatorColumn annotation to
express Hibernate-specific discriminator properties.-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanIf enabled, allowed discriminator values are always explicitly enumerated inselectqueries, even when retrieving all instances of a root entity and its subtypes.booleanShould befalseif a discriminator column is also part of a mapped composite identifier, and should not be duplicated in SQLINSERTstatements.
-
Element Details
-
force
boolean forceIf enabled, allowed discriminator values are always explicitly enumerated inselectqueries, even when retrieving all instances of a root entity and its subtypes. This is useful if there are discriminator column values which do not map to any subtype of the root entity type.This setting has the side effect of suppressing the generation of a
checkconstraint in the DDL for the discriminator column.- Returns:
trueif allowed discriminator values must always be explicitly enumerated
- Default:
false
-
insert
boolean insertShould befalseif a discriminator column is also part of a mapped composite identifier, and should not be duplicated in SQLINSERTstatements.- Default:
true
-