JBoss.org Community Documentation  Chapter 30. Introduction
Single Inheritance in EJB3 Entities  The EJB specification
allows you to define entities that inherit from one another. The
inheritance relationships can be reflected in queries as well.
So, if you queried based on the base class, the query is
polymorphic.  The tutorial example uses the single table
strategy to map an inheritance relationship of
org.jboss.tutorial.singleinheritance.bean.Pet, which is the base
class for org.jboss.tutorial.singleinheritance.bean.Cat and
org.jboss.tutorial.singleinheritance.bean.Dog. With the single
table strategy, the entire class hierarchy is persisted in one
big single table. A discriminator column is required to
differentiate between which class type is persisted in a
particular row. This is what the annotations look like for Pet.
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(name = "ANIMAL_TYPE", discriminatorType =
DiscriminatorType.STRING) public class Pet implements
java.io.Serializ