Annotation Interface BelongsTo


@Retention(RUNTIME) @Target(TYPE) public @interface BelongsTo
Place on a child 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 HasMany, but is placed on a 'child' 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:
1.0
Author:
Igor Polevoy
See Also:
HasMany
  • Element Details