JPA entity

A class marked @Entity whose instances JPA stores as rows in a table, identified by a field marked @Id.

In more detail

An entity represents something with durable identity. Fields map to columns by default, and annotations control names, relationships and nullability. It is shaped for the database, so it need not be the same type a controller returns as JSON.

Example

@Entity public class OrderEntity { @Id private String id; ... }

Related terms

Taught in

References