@Retention(CLASS) @Target({FIELD})

public @interface JoinTable

Join table and key column names for an owning to-many association.

Methods

public abstract String name()Names the table storing association membership.
public abstract String joinColumn() default "owner_id"Names the join-table key column referring to the owner.
public abstract String inverseJoinColumn() default "target_id"Names the join-table key column referring to the target.

Method details

name

public abstract String name()
Names the table storing association membership.

Returns

join table name

joinColumn

public abstract String joinColumn() default "owner_id"
Names the join-table key column referring to the owner.

Returns

column name; owner_id by default

inverseJoinColumn

public abstract String inverseJoinColumn() default "target_id"
Names the join-table key column referring to the target.

Returns

column name; target_id by default