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.

Since:
2.0
Author:
Christof Schablinski
See Also:
BelongsTo
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    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.