This article is about hibernate practical example. Below is an example of hibernate with my sql using hibernate annotations. Here is the Student bean class with id and name properties with annotations. package beans; import javax.persistence.Column;import javax.persistence.Entity;import javax.persistence.GeneratedValue;import javax.persistence.Id;import javax.persistence.Table; @Entity@Table(name="student_master")public class Student { @Id @GeneratedValue @Column(name="stud_id") private long id; @Column(name="name") private String name; /** * getters and setters * […]
↧