JavaScript is disabled on your browser.
Skip navigation links
javax.persistence

Annotation Type Inheritance



  • @Target(value=TYPE)
     @Retention(value=RUNTIME)
    public @interface Inheritance
    Specifies the inheritance strategy to be used for an entity class hierarchy. It is specified on the entity class that is the root of the entity class hierarchy. If the Inheritance annotation is not specified or if no inheritance type is specified for an entity class hierarchy, the SINGLE_TABLE mapping strategy is used.
     Example:
     @Entity
     @Inheritance(strategy=JOINED)
     public class Customer { ... }
     @Entity
     public class ValuedCustomer extends Customer { ... }
     
    Since:
    Java Persistence 1.0
    • Optional Element Summary

      Optional Elements
      Modifier and Type Optional Element and Description
      InheritanceType strategy
      The strategy to be used for the entity inheritance hierarchy.
    • Element Detail

      • strategy

        public abstract InheritanceType strategy
        The strategy to be used for the entity inheritance hierarchy.
        Default:
        javax.persistence.InheritanceType.SINGLE_TABLE
Skip navigation links

Copyright © 1996-2015, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.

AltStyle によって変換されたページ (->オリジナル) /