Skip to content

Latest commit

 

History

History
19 lines (16 loc) · 505 Bytes

Id.md

File metadata and controls

19 lines (16 loc) · 505 Bytes

Id Annotation

Marks a field as the identifier (primary key) of an entity class. This annotation is typically applied to a field within a Java class that represents an entity in a data store. The presence of this annotation signals that the annotated field is used to uniquely identify instances of the entity class.

Examples

Basic Usage

@Entity
public class Person {
    @Id
    private Long id;
}

See also: