@Table (jpa)
The @Table
annotation is part of the Jakarta Persistence API (JPA) and is used to specify the primary table for a mapped entity.
By default, the table name is assumed to be the same as the entity name, but @Table
allows customization of the table name and other table-level details.
Although this annotation is recognised by Causeway, its metadata is currently unused.
Usage
Annotate your entity class with @Table
to define the table mapping:
import jakarta.persistence.Entity;
import jakarta.persistence.Table;
@Entity
@Table(name = "customers")
public class Customer {
// ...
}
See Also
-
@Table (JPA API javadoc)