Spring Data JPA Annotations



@Entity anotation declares a class as an entity.


@Table anotation defines the table, catalog, and schema name for your entity.


@Id defines the unique identifier for your entity.


@Column defines a column and its characteristics such as column name, column updatable or not, etc


@GeneratedValue defines how the id column is generated.


@OnDelete defines what orphan tables should do on delete

@OnDelete(action = OnDeleteAction.CASCADE)


Subscribe To Our Newsletter
You will receive our latest post and tutorial.
Thank you for subscribing!


Leave a Reply

Your email address will not be published. Required fields are marked *