BE Study 8th
Let's take a look at JPA through looking into Post.java @Entity @Table(name = "posts") @Entity is an annotation that enables the following class to be mapped with a table of DB. @Table is an annotation that designates which table the entity will be mapped to. It has parameters like name: designates the name of the table to which entity will be mapped, uses entity's name if not given. catalog: map catalog schema: map schema uniqueContraints: generate unique constraints if use DDL public class Post { defines the class @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "post_id_generator") @SequenceGenerator(name = "post_id_generator", sequenceName = "post_id_seq", allocationSize = 5) @Id means that the following attribute will be the primary key of the table. @GeneratedValue is the value that uses other strategies to define primary key like strategy = GenerationType.IDENTITY: this uses 'AUTO_INCREMENT'...