Annotation Interface Many2Many


Use this annotation to override conventions in cases where they are impossible to follow. This annotation does not have to be placed on two models, one is sufficient.
Author:
Igor Polevoy
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Name of a table used for joining records from other tables.
    Class<? extends Model>
    This is a type of a model that is the "other" end of the relationship.
    Foreign key name of a source table in the join.
    Foreign key name of a target table in the join table.
  • Element Details

    • other

      Class<? extends Model> other
      This is a type of a model that is the "other" end of the relationship.
    • join

      String join
      Name of a table used for joining records from other tables.
    • sourceFKName

      String sourceFKName
      Foreign key name of a source table in the join. A "source" table is a table that backs the model on which this annotation is used.
    • targetFKName

      String targetFKName
      Foreign key name of a target table in the join table. A "target" table is a table that backs the "other" model.