Annotation Type HasMany
-
@Retention(RUNTIME) @Target(TYPE) @Repeatable(HasManies.class) public @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
HasManyandBelongsToon 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>childStringforeignKeyNameForeign key column name in child table.
-