I am using hibernate 4.1.0,jpa 2.1.when i try putting a one to many relationship I get the error above. I have tried other solutions on stack-overflow but they don,t work for me
Here is my bean class:
@Entity
public class Users implements Serializable {
@GeneratedValue(strategy = GenerationType.AUTO)
@Id
private int Id;
private int orgId;
private String salutation;
private String firstName;
private String lastName;
private String email;
private String telephone;
private String universalRecordLocator;
private String password;
private String userLevel;
@OneToOne(cascade = CascadeType.ALL)
@JoinColumn(name = "employee_id")
UserRoles userRoles;
public int getId() {
return Id;
}
...
bellow is the stack-trace:
Exception in thread "main" java.lang.NoSuchMethodError: javax.persistence.OneToOne.orphanRemoval()Z