Annotation Interface EmbeddedTable


@Target({METHOD,FIELD}) @Retention(RUNTIME) @Incubating public @interface EmbeddedTable
An easier mechanism to declare the table to which an embedded value maps compared to the Jakarta Persistence compliant mechanism requiring multiple AttributeOverride and AssociationOverride annotations.
  @Entity
  @Table(name="primary")
  @SecondaryTable(name="secondary")
  class Person {
        ...
        @Embedded
        @EmbeddedTable("secondary")
        Address address;
  }
 
Since:
7.2
See Also:
API Note:
Only supported for an embedded declared on an entity or mapped-superclass; all other (mis)uses will lead to a AnnotationPlacementException.
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The name of the table in which the embedded value is stored.
  • Element Details

    • value

      String value
      The name of the table in which the embedded value is stored.