For example, object Person is a base class, OldPerson and YoungPerson are subclasses to inherit Person. They are mapped to T T_Person, to DIS, define Discriminator-Value: Person -> P OldPerson -> O YoungPerson -> Y When T_Person generates data of the Person object, the value of the DIS is "P" "; Oldperson corresponds to the DIS value of" O "; YoungPerson is" Y ". This will know which object is belonging to a row of data of the T_Person table.
example:
id>
set>
subclass>
subclass>
class> hibernate-maping>