Hibernate needs mandatory @Id column in mapping class
It looks very simple and silly, actually i faced this issue while working in our project and frighted with this for an hour. My requirement was to create mapping class for an oracle view. As we know there is no primary key for the view, so what can i give as an Id for the view. So i created a persistence class for that view and tried to get data from that view. Example :- @Entity @Table(name="VIEW_STUDENT_REPORT") public class ViewStudentReport implements Serializable { private static final long serialVersionUID = 1L; @Column(name="STUDENT_ID") private String studentId; @Column(name="STUDENT_NAME") private String studentName; public String getStudentId() { return studentId; } public void setStudentId(String studentId) { this.studentId= studentId; } public String getStudentName() { return studentName; } public void setStudentN...