Tag:ar use sp data on log bs ef database
Table Association (@JoinTable) Note Description:
@Target ({METHOD, FIELD})
Public @interface jointable{
String name () default "";
String catalog () default "";
String schema () default "";
Joincolumn[] Joincolumns () default {};
Joincolumn[] Inversejoincolumns () default {};
Uniqueconstraint[] uniqueconstraints default {};
}
# The Name property is the table names that connect two tables. If not specified, the default table name is used, in the following format:
"Table Name 1" + "_" + "Table Name 2"
The # Joincolumn property represents a field that holds the foreign key of the associated relationship in the table that holds the relationship, and is used with the @joincolumn tag;
# The Inversejoincolumn property is similar to Joincolumn, which holds another foreign key field for the save relationship;
# The catalog and schema properties represent the entity's specified point directory name or database name;
# The Uniqueconstraints property represents the unique constraint that the entity is associated with, an entity can have more than one unique constraint, and no constraint by default;
Note: @JoinTable not only be able to define a one-to-many association, but also to define a many-to-many table association.
Hibernate annotation @jointable Description