Annotation Interface JoinTable


@Retention(RUNTIME) @Target(FIELD) public @interface JoinTable
Specifies a join table for defining a many-to-many association between two entities. When using this annotation, you must specify the name of the join table, the join column, the inverse join column, and optionally, foreign key constraints for both columns. The join table should only be specified on fields representing many-to-many associations, and it cannot be used for other types of associations (e.g., one-to-many, many-to-one).
Since:
1.0
Author:
Blyzhnytsia Team
See Also:
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Specifies the inverse join column for the association.
    Specifies the join column for the association.
    Specifies the name of the join table.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Specifies the foreign key constraint for the join column.
    Specifies the foreign key constraint for the inverse join column.
  • Element Details

    • name

      String name
      Specifies the name of the join table.
      Returns:
      the name of the join table
    • joinColumn

      JoinColumn joinColumn
      Specifies the join column for the association.
      Returns:
      the join column for the association
    • inverseJoinColumn

      JoinColumn inverseJoinColumn
      Specifies the inverse join column for the association.
      Returns:
      the inverse join column for the association
    • foreignKey

      ForeignKey foreignKey
      Specifies the foreign key constraint for the join column.
      Returns:
      the foreign key constraint for the join column
      Default:
      @io.github.blyznytsiaorg.bibernate.annotation.ForeignKey(name="")
    • inverseForeignKey

      ForeignKey inverseForeignKey
      Specifies the foreign key constraint for the inverse join column.
      Returns:
      the foreign key constraint for the inverse join column
      Default:
      @io.github.blyznytsiaorg.bibernate.annotation.ForeignKey(name="")