Tutorialspoint examples

Learn java tutorial with examples for beginners online

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.

Posted in JPA   
Download tutorialspointexamples Android App
Copyright © 2018 Tutorialspoint examples DMCA.com Protection Status