Java Persistence API (JPA) Extensions Reference for EclipseLink, Release 2.5
  Go To Table Of Contents
 Search
 PDFComments
Comments


@DiscriminatorClass

Use @DiscriminatorClass with a @VariableOneToOne annotation to determine which entities will be added to the list of types for the mapping.


Annotation Elements

Table 2-19 describes this annotation's elements.

Table 2-19 @DiscriminatorClass Annotation Elements

Annotation Element Description Default

discriminator

(Required) The discriminator to be stored in the database.


value

(Required) The class to be instantiated with the discriminator.




Usage

The @DiscriminatorClass annotation can be specified only within a @VariableOneToOne mapping.


Examples

See "@VariableOneToOne" for an example of a variable one-to-one mapping with @DiscriminatorClass.


See Also

For more information, see: