Annotation Type MapKeyJoinColumns


@Target(FIELD) @Retention(RUNTIME) public @interface MapKeyJoinColumns
Supports composite map keys that reference entities.

The MapKeyJoinColumns annotation groups MapKeyJoinColumn annotations. When the MapKeyJoinColumns annotation is used, both the name and the referencedColumnName elements must be specified in each of the grouped MapKeyJoinColumn annotations.

Since:
Java Persistence 2.0
See Also:
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    (Required) The map key join columns that are used to map to the entity that is the map key.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    (Optional) The foreign key constraint specification for the join columns.
  • Element Details

    • value

      (Required) The map key join columns that are used to map to the entity that is the map key.
      Returns:
      The join cols
    • foreignKey

      ForeignKey foreignKey
      (Optional) The foreign key constraint specification for the join columns. This is used only if table generation is in effect. Default is provider defined.
      Returns:
      The foreign key specification
      Default:
      @javax.persistence.ForeignKey