Specifies the discriminator column for the mapping strategy.
If the
DiscriminatorColumn
annotation is missing,
the name of the discriminator column defaults to "dtype"
.
Example usage:
@Entity
@DiscriminatorColumn(name = "dtype")
public class Animal {
// Common fields and methods for all animals
}
@Entity
public class Dog extends Animal {
// Specific fields and methods for dogs
}
@Entity
public class Cat extends Animal {
// Specific fields and methods for cats
}
- Since:
- 1.0.0
-
Optional Element Summary
Optional Elements -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The default name of the discriminator column, which is"dtype"
.
-
Field Details
-
DEFAULT_DISCRIMINATOR_COLUMN
The default name of the discriminator column, which is"dtype"
.- See Also:
-
-
Element Details
-
value
String value(Optional) The name of the column to be used for the discriminator.- Returns:
- the column's name
- Default:
"dtype"
-