How to get the DiscriminatorValue at run time
问题 We have the following classes @Entity @Inheritance(strategy = InheritanceType.SINGLE_TABLE) // optional annotation as this is default @DiscriminatorColumn(name = "apType", discriminatorType = DiscriminatorType.STRING, length = 255) @DiscriminatorValue("AP") public class ApplicationProcess { } And this @Entity @DiscriminatorValue("APS") public class ApplicationProcessScheme extends ApplicationProcess { } Now I need to know at runtime if the ApplicationProcess is of DiscriminatorValue AP or APS