There is a mapping exception for a particular entity. Cant figure out from where the problem is arising. I checked all the mappings 3 times from start to end. Still i am get
For those who are using annotations to solve this, the classes should look like this:
@Entity
public class Email {
@Id
@GeneratedValue(strategy=GenerationType.SEQUENCE)
private int intEmailID;
@Column(insertable = false, updatable = false)
private int employeeId;
@ManyToOne
private EmailType emailType;
@ManyToOne
@JoinColumn(name="employeeId")
private Employee employee;
// Getters and Setter
}
@Entity
public class Employee {
@Id
private int id;
@OneToMany(cascade = {CascadeType.ALL}, mappedBy="employeeId")
@PrimaryKeyJoinColumn
private List emailList;
public void setEmailList(List emailList) {
this.emailList = emailList
}
public List getEmailList() {
return emailList;
}
// Rest of getters and setters
}