@Retention(value=RUNTIME) @Target(value=TYPE) 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 HasMany
and BelongsTo
on the two related models. Just one is
fully sufficient.
BelongsTo
Modifier and Type | Required Element and Description |
---|---|
Class<? extends Model> |
child |
String |
foreignKeyName
Foreign key column name in child table.
|
Copyright © 2019 JavaLite. All rights reserved.