Greetings!    @Entity - Add in class level. Declares that this class is an entity    @Entity public class Employee {     // ... }     @Table - Add in class level. Define table, schema, catalog. Use name property to add the name of the table unless class name is used as the table name.    @Entity @Table(name = "tbl_employee") public class Employee {     // ... }     @Column - Add column properties.    @Column(name = "first_name") private String firstName;     @Id - Declares property as the identifier of this class.    @Id private Long id;     @GeneratedValue - use along with @Id to generate primary key automatically. JPA defines 5 strategies.    @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id;    AUTO - select depending on the underlying database.  IDENTITY  SEQUENCE  TABLE  identity copy - identity is copied form another entity.    @Version - Adding this will add optimistic locking capability. For an update query Hibernate will automatically ...
May all beings be happy, be well, be peaceful, and be free