JPA Table annotation

The Table annotation is used to specify the primary table for the annotated entity. Additional tables may be specified using SecondaryTable or SecondaryTables annotation. Example:

@Entity
@Table(name="Student")
public class Student { 
 
… 
 
}

Attribute:

Name: The name of the table. It is an optional attribute. Schema: The schema of the table. It is an optional attribute. UniqueConstraints: Unique constraints that are to be placed on the table. It is an optional attribute. Catalog: The catalog of the table. It is an optional attribute. Indexes: Indexes for the table. It is an optional attribute.

Please follow and like us:
Content Protection by DMCA.com