org.javalite.activejdbc.annotations
Annotation Type Many2Many


@Retention(value=RUNTIME)
@Target(value=TYPE)
public @interface Many2Many

Use this annotation to override conventions in cases where they are impossible to follow. This annotation does not have to be placed on two models, one is sufficient.

Author:
Igor Polevoy

Required Element Summary
 String join
          Name of a table used for joining records from other tables.
 Class<? extends Model> other
          This is a type of a model that is the "other" end of the relationship.
 String sourceFKName
          Foreign key name of a source table in the join.
 String targetFKName
          Foreign key name of a target table in the join table.
 

Element Detail

other

public abstract Class<? extends Model> other
This is a type of a model that is the "other" end of the relationship.


join

public abstract String join
Name of a table used for joining records from other tables.


sourceFKName

public abstract String sourceFKName
Foreign key name of a source table in the join. A "source" table is a table that backs the model on which this annotation is used.


targetFKName

public abstract String targetFKName
Foreign key name of a target table in the join table. A "target" table is a table that backs the "other" model.



Copyright © 2015 JavaLite. All rights reserved.