Annotation Interface HasMany

Place on a parent model of the One-to-many relationship if the tables do not follow the ActiveJDBC naming conventions.

This annotation will do exactly the same as BelongsTo, but is placed on a 'parent' side of a relationship.

There is no need to add both HasMany and BelongsTo on the two related models. Just one is fully sufficient.

Christof Schablinski
See Also:
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Class<? extends Model>
    Foreign key column name in child table.
  • Element Details

    • child

      Class<? extends Model> child
    • foreignKeyName

      String foreignKeyName
      Foreign key column name in child table.