Annotation Type ForeignKey


@Target({FIELD,METHOD,TYPE}) @Retention(RUNTIME) public @interface ForeignKey
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Name of the foreign key.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Used for the non-owning side of a ManyToMany relationship.
  • Element Details

    • name

      String name
      Name of the foreign key. Used in OneToMany, ManyToOne, and OneToOne relationships. Used for the owning side in ManyToMany relationships
    • inverseName

      String inverseName
      Used for the non-owning side of a ManyToMany relationship. Ignored in other relationships
      Default:
      ""